NSURLConnection timing out without delegate getting connection:didFailWithError: callback
NSURLConnection timing out without delegate getting connection:didFailWithError: callback
- Subject: NSURLConnection timing out without delegate getting connection:didFailWithError: callback
- From: Glenn Zelniker <email@hidden>
- Date: Sat, 11 Mar 2006 15:38:30 -0500
I have a NSURLConnection that I create using a NSMutableURLRequest.
The connection uploads data to a server via an http POST operation.
The connection works fine 99.99999% of the time -- it fails properly
when the connection to the Internet breaks, it sends
connection:didReceiveResponse: messages to the delegate, it sends
connection:didReceiveData: messages to the delegate, it sends
connection:didFinishLoading: messages to the delegate, etc. The only
problem I'm having is that the delegate doesn't seem to see a
connection:didReceiveError: message when the connection times out. I
made sure to set the timeoutInterval in the request -- it's set to
10.0 seconds.
So I have two question:
1. If NSURLConnection times out, should the connection be sending the
delegate a connection:didFailWithError: message? I would assume this
is the appropriate behavior and that's what the NSURLErrorTimedOut
error code is for.
2. Have I stumbled upon a known issue?
I repeat, the code almost always works fine and seems to be rock
solid *except* for this one little issue.
Thanks in advance,
Glenn Zelniker
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden