• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
CLOSE_WAIT with CFHTTPMessage
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: CLOSE_WAIT with CFHTTPMessage
      • From: Greg Hulands <email@hidden>
    • Re: CLOSE_WAIT with CFHTTPMessage
      • From: Mark Pauley <email@hidden>
  • Prev by Date: Re: Mac networking info
  • Next by Date: Re: CLOSE_WAIT with CFHTTPMessage
  • Previous by thread: Re: Mac networking info
  • Next by thread: Re: CLOSE_WAIT with CFHTTPMessage
  • Index(es):
    • Date
    • Thread