Closed GoogleCodeExporter closed 9 years ago
And because of this forced minimum 240-second timeout problem on
iOS(https://devforums.apple.com/message/108087#108087,
http://stackoverflow.com/questions/2736967/nsmutableurlrequest-not-obeying-my-ti
meoutinterval), can we implement our own timeout with NSTimer and
NSURLConnection's cancel method?
Thanks.
Original comment by an0...@gmail.com
on 10 May 2012 at 5:20
You can set a timer and call cancelTicket: to implement your own timeout.
Original comment by grobb...@google.com
on 10 May 2012 at 5:58
Yes. But one more thing we offer in the framework, one less thing thousands of
devs need to do.
Original comment by an0...@gmail.com
on 10 May 2012 at 6:37
I don't think most apps should be setting a timeout at all. Users should be the
ones to cancel requests. If the user isn't waiting on the fetch, there's no
need for it to timeout.
Original comment by grobb...@google.com
on 10 May 2012 at 8:05
If I setup my own timeout with NSTimer and cancelTicket:, I have to duplicate
timeout handling code in two places: one in the query's completionHandler, one
in my timeout callback.
If GTLService setups the timeout, it should naturally return the timeout as an
error in the query's completionHandler, just as the real NSURLConnection
timeout, then I only need to simply handle that in the completionHandler.
Original comment by an0...@gmail.com
on 12 May 2012 at 3:16
Unless additional developers indicate a need for this functionality, I do not
expect it to be incorporated into the library.
Original comment by grobb...@google.com
on 17 May 2012 at 1:56
Original issue reported on code.google.com by
an0...@gmail.com
on 10 May 2012 at 4:40