Re: Timeouts in NSURLSession
Re: Timeouts in NSURLSession
- Subject: Re: Timeouts in NSURLSession
- From: Jens Alfke <email@hidden>
- Date: Thu, 30 Jul 2015 11:04:44 -0700
> On Jul 29, 2015, at 5:55 PM, Rick Mann <email@hidden> wrote:
>
> It seems the only workaround is to make the timeoutIntervalForRequest very long, too, which is gross, as a single request may legitimately time out in a short amount of time, but the large set of tasks could take much longer to run through.
I’ve recently seen the argument made that most network requests should _never_ time out: it’s better to let the user decide when something’s taking too long. In some cases they may be prepared to wait ten minutes for a server to respond while downloading some crucial file, while in other cases they’ll give up in ten seconds. Just give the user something like a Stop button to cancel the operation.
The exception would be where an operation is completely invisible to the user, but even in that case it might be better to put up an alert like “The automatic backup is stalled because the server isn’t responding. Do you want to keep trying or give up?”
—Jens
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden