Re: Spoon-feeding NSURLConnection
Re: Spoon-feeding NSURLConnection
- Subject: Re: Spoon-feeding NSURLConnection
- From: Steve Sisak <email@hidden>
- Date: Wed, 27 Jun 2012 21:59:52 -0400
At 12:33 PM -0700 6/27/12, Jens Alfke wrote:
What's unusual about my scenario is that TouchDB has a connection to
the server's "_changes feed", listening for database changes. This
feed is an HTTP resource but it uses a "long poll" or "hanging GET"
- I send a GET to it, and the server doesn't send back a response
until it has data to send. So the connection is expected to stay
open for an indefinite time.
The problem is that CFNetwork appears to be scheduling one of the
other GETs on the same socket as the _changes feed connection. And
since the _changes feed connection never closes (until some future
time when a change occurs on the server), that means the other
request gets stuck. Eventually it times out.
Dumb question: have you tried putting your _changes feed on a
separate RunLoop from your other requests? Ought to be easy to try.
-Steve
_______________________________________________
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