Re: What happens when an NSURLSessionTask is canceled?
Re: What happens when an NSURLSessionTask is canceled?
- Subject: Re: What happens when an NSURLSessionTask is canceled?
- From: "Quinn \"The Eskimo!\"" <email@hidden>
- Date: Wed, 02 Dec 2015 10:24:48 +0000
On 2 Dec 2015, at 03:45, Rick Mann <email@hidden> wrote:
> What happens when an NSURLSessionTask is canceled? Does its callback or delegate get called with an error indicating it was canceled?
Yes. This is clearly documented. Oh wait, it's not. That sucks. My apologies.
Let's try again...
This is clearly described by a comment in the <Foundation/NSURLSession.h>:
-cancel returns immediately, but marks a task as being canceled. The
task will signal -URLSession:task:didCompleteWithError: with an
error value of { NSURLErrorDomain, NSURLErrorCancelled }. In some
cases, the task may signal other work before it acknowledges the
cancelation. -cancel may be sent to a task that has been suspended.
I've filed a bug to get the docs in sync with the headers <rdar://problem/23721558>.
Share and Enjoy
--
Quinn "The Eskimo!" <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden