travisjeffery / TRVSURLSessionOperation

NSURLSession and NSOperationQueue working together

Home Page:https://twitter.com/travisjeffery

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cancelling a task

dvkch opened this issue · comments

Hi,

I found an issue with your implementation of the method -completeOperationWithBlock:data:response:error:. It turns out if the task is cancelled the block is not called which is an unexpected behavior. Since you cancel the underlying NSURLSessionDataTask which then calls its completion block with an NSURLErrorCancelled error one could think it will be forwarded to the operation's completion block.

Thanks for considering