NSURLConnections being dropped on the floor?
NSURLConnections being dropped on the floor?
- Subject: NSURLConnections being dropped on the floor?
- From: Jens Alfke <email@hidden>
- Date: Mon, 25 Jun 2012 09:55:17 -0700
I (and some users of my library) have occasionally been seeing problems where an HTTP transaction never completes. The library starts an NSURLRequest, but nothing happens to it — no delegate methods are ever called, and no packets are ever sent. This is one of many parallel requests being sent to the same host; my code is essentially doing a bulk download of multiple sibling resources.
Anecdotally, this seems to happen mostly on iOS (both device and simulator) although I believe I've seen it in the past on OS X. (Latest released versions, i.e. 5.1.1 and 10.7.4.)
I've been able to make this happen less often by implementing my own request queue that limits the number of simultaneously-active NSURLConnections; a limit of 8 seems to work pretty well. But I still get occasional reports of the problem — here's the latest one < https://github.com/couchbaselabs/TouchDB-iOS/issues/98>.
Are there any known CFNetwork bugs that could cause this? I really don't think it's a problem with my code: as far as I know, the contract of NSURLConnection requires it to call at least one delegate method, and that's not happening. It's as though CFNetwork lost track of the object.
—Jens |
_______________________________________________
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