Skip to content

SR-2683 URLSessionDelegate didCompleteWithError callback never triggered #636

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

Merged
merged 1 commit into from
Sep 13, 2016

Conversation

seabaylea
Copy link
Contributor

SR-2638 reports that the following URLSessionDelegate callback is never triggered:

func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?)

This is actually caused by a function signature issue - I'm not sure why the compiler isn't picking it up.

On Linux, the function signature for the callback is currently using the old style:

internal func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: NSError?)

ie. its specified as an NSError instead of Error.

This PR switches over the API, and coerces the NSError to an Error before calling the callback.

@parkera
Copy link
Contributor

parkera commented Sep 13, 2016

@swift-ci please test and merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants