[foundation] Honor the cancellation token win the async requests in NSUrlSessionHandler - #1888
Merged
Merged
Conversation
Do pass the cancelation token in the NSUrlSessionHandler to ensure that if the request is cancelled we do not hang for ever.
Contributor
|
Build success |
spouliot
suggested changes
Mar 20, 2017
spouliot
left a comment
Contributor
There was a problem hiding this comment.
Please check the PR document and update the the commit message, i.e. minimally add the associated bug report.
| if (inflight.CancellationToken.IsCancellationRequested) { | ||
| dataTask.Cancel(); | ||
| } | ||
|
|
Contributor
There was a problem hiding this comment.
^ incorrect alignment (spaces no tabs) and missing space before (). Please check your editor settings
|
|
||
| var content = new NSUrlSessionDataTaskStreamContent (inflight.Stream, () => { | ||
| if (!inflight.Completed) { | ||
| dataTask.Cancel(); |
Contributor
|
Build success |
rolfbjarne
approved these changes
Mar 22, 2017
spouliot
approved these changes
Mar 22, 2017
spouliot
pushed a commit
to spouliot/xamarin-macios
that referenced
this pull request
Mar 23, 2017
…SUrlSessionHandler. Fixes #51423 (dotnet#1888) Do pass the cancelation token in the NSUrlSessionHandler to ensure that if the request is cancelled we do not hang for ever. https://bugzilla.xamarin.com/show_bug.cgi?id=51423
spouliot
pushed a commit
to spouliot/xamarin-macios
that referenced
this pull request
Mar 24, 2017
…SUrlSessionHandler. Fixes #51423 (dotnet#1888) Do pass the cancelation token in the NSUrlSessionHandler to ensure that if the request is cancelled we do not hang for ever. https://bugzilla.xamarin.com/show_bug.cgi?id=51423
spouliot
pushed a commit
to spouliot/xamarin-macios
that referenced
this pull request
Mar 27, 2017
…SUrlSessionHandler. Fixes #51423 (dotnet#1888) Do pass the cancelation token in the NSUrlSessionHandler to ensure that if the request is cancelled we do not hang for ever. https://bugzilla.xamarin.com/show_bug.cgi?id=51423
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Do pass the cancelation token in the NSUrlSessionHandler to ensure that
if the request is cancelled we do not hang for ever.
This is a partial fix (just addresses the NSUrlSessionhandler) for bug #51423