• 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
Re: Spoon-feeding NSURLConnection
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Spoon-feeding NSURLConnection
      • From: Jens Alfke <email@hidden>
References: 
 >Spoon-feeding NSURLConnection (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: Spoon-feeding NSURLConnection
  • Next by Date: Re: Spoon-feeding NSURLConnection
  • Previous by thread: Re: Spoon-feeding NSURLConnection
  • Next by thread: Re: Spoon-feeding NSURLConnection
  • Index(es):
    • Date
    • Thread