> On Feb 9, 2016, at 10:38 AM, Alex Zavatone <z...@mac.com> wrote:
> 
> Simply put, if we can detect that this user is has turned off Airplane mode, 
> we can respond in a more cautious manner.

But you can run into the same behaviors if the user has turned WiFi and/or 
cellular off and then back on. The Airplane Mode switch is just a ‘macro’ that 
turns WiFi, cellular and Bluetooth off (or back on) at once. You can also get 
race conditions if the device has been away from WiFi and then comes in range 
of a network that takes a little while to negotiate. (Usually if you’re 
listening for reachability of a specific host, you won’t hit these in-between 
states, though.)

The way we deal with this is to retry HTTP requests, if they fail with some 
common transient IP-level errors like ‘no route to host’ or ‘connection reset 
by peer’. The retry delay doubles after each failure, and most types of 
requests give up after 3 failures, so the delays are like 1, 2, 4 seconds.

—Jens
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to