• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: What happens when an NSURLSessionTask is canceled?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >What happens when an NSURLSessionTask is canceled? (From: Rick Mann <email@hidden>)

  • Prev by Date: Re: How to use NWTCPConnectionAuthenticationDelegate for self signed certificate
  • Next by Date: Re: Problem with connection via Proxy using CFNetwork in TCP stream
  • Previous by thread: What happens when an NSURLSessionTask is canceled?
  • Next by thread: Re: Macnetworkprog Digest, Vol 12, Issue 109
  • Index(es):
    • Date
    • Thread