CLOSE_WAIT with CFHTTPMessage
CLOSE_WAIT with CFHTTPMessage
- Subject: CLOSE_WAIT with CFHTTPMessage
- From: Greg Hulands <email@hidden>
- Date: Thu, 24 Jun 2010 10:42:49 -0700
Hi,
I'm trying to track down a problem with my app not closing the sockets when using CFHTTPMessageCreateRequest(). Once the request has finished loading I clean things up with the following:
- (void)finishLoad {
if (_readStreamRef) {
CFReadStreamSetClient(_readStreamRef, kCFStreamEventNone, NULL, NULL);
CFReadStreamUnscheduleFromRunLoop(_readStreamRef, CFRunLoopGetCurrent(), kCFRunLoopCommonModes);
CFReadStreamClose(_readStreamRef);
CFSocketInvalidate();
CFRelease(_readStreamRef);
_readStreamRef = NULL;
}
isFinished = YES;
}
Because my app can upload a couple of thousand file in one session, I am running out of file descriptors. Is there something that I'm not doing to get the underlying socket to close properly?
thanks,
Greg
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden