ios - Using three NSURLConnections in a row causes third call to hang -


i running weird issue nsurlconnection. have controller makes 3 asynchronous requests in viewdidload method using following function:

+ (void)connectasyncwithurl:(nsurl *)url httpmethod:(nsstring *)httpmethod delegate:(id <nsurlconnectiondelegate>)delegate timeout:(nstimeinterval)timeout {     nsmutableurlrequest *request = [[nsmutableurlrequest alloc] initwithurl:url cachepolicy:nsurlrequestreloadignoringlocalcachedata timeoutinterval:timeout];     [request sethttpmethod:httpmethod];     [nsurlconnection connectionwithrequest:request delegate:delegate]; } 

the first 2 connections work expected. third hangs until timeout occurs. doing re-try after failure causes call succeed. doesn't seem matter order requests in - it's 1 called last fails. own server request being made to, , watching incoming network traffic shows me first 2 requests, third not appear third nsurlconnection until initial timeout. stranger after timeout occurs, if navigate away controller , again, issue no longer reproducible until restart app.

does have idea causing this?

some servers limit number of simultaneous connections single client two. if case, first 2 connections succeed , third hang until 1 of first 2 completes. sounds explain you're seeing.


Comments

Popular posts from this blog

ios - iPhone/iPad different view orientations in different views , and apple approval process -

java Extracting Zip file -

C# WinForm - loading screen -