-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Implementation of URLSessionTask.cancel() #689
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@swift-ci please test |
s.delegateQueue.addOperation { | ||
delegate.urlSession(s, task: self, didCompleteWithError: NSError(domain: NSURLErrorDomain, code: NSURLErrorCancelled, userInfo: nil)) | ||
self.internalState = .taskCompleted | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't a call of completeTask(withError:)
cover all situations when there is a need to perform a task completion? Or .cancel()
should only call URLSession:task:didCompleteWithError: on delegate and not call any other callbacks?
5d5036e
to
164be73
Compare
@swift-ci please test |
@naithar Thanks for the suggestion. Can you please review? |
Looks good to me. :) |
@parkera Can you please review? Thanks. |
Looks reasonable to me. |
Thanks. |
@swift-ci please test and merge |
No description provided.