On 2 Dec 2015, at 03:45, Rick Mann <rm...@latencyzero.com> 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      (Macnetworkprog@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/macnetworkprog/archive%40mail-archive.com

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

Reply via email to