Skip to content

[foundation] Honor the cancellation token win the async requests in NSUrlSessionHandler - #1888

Merged
spouliot merged 2 commits into
dotnet:masterfrom
mandel-macaque:fix-51423
Mar 22, 2017
Merged

[foundation] Honor the cancellation token win the async requests in NSUrlSessionHandler#1888
spouliot merged 2 commits into
dotnet:masterfrom
mandel-macaque:fix-51423

Conversation

@mandel-macaque

@mandel-macaque mandel-macaque commented Mar 20, 2017

Copy link
Copy Markdown
Contributor

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

Do pass the cancelation token in the NSUrlSessionHandler to ensure that
if the request is cancelled we do not hang for ever.
@monojenkins

Copy link
Copy Markdown
Contributor

Build success

@spouliot spouliot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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();
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^ incorrect alignment (spaces no tabs) and missing space before (). Please check your editor settings

Comment thread src/Foundation/NSUrlSessionHandler.cs Outdated

var content = new NSUrlSessionDataTaskStreamContent (inflight.Stream, () => {
if (!inflight.Completed) {
dataTask.Cancel();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

@monojenkins

Copy link
Copy Markdown
Contributor

Build success

@spouliot spouliot changed the title [Foundation] Honor the cancellation token win the async requests. [foundation] Honor the cancellation token win the async requests in NSUrlSessionHandler Mar 22, 2017
@spouliot
spouliot merged commit cea5939 into dotnet:master 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
@mandel-macaque
mandel-macaque deleted the fix-51423 branch December 11, 2018 08:40
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.

5 participants