Skip to content
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

Allow ConnectionListener.AcceptAsync() to return null #41442

Merged
merged 2 commits into from
Aug 27, 2020

Conversation

CarnaViire
Copy link
Member

@CarnaViire CarnaViire commented Aug 27, 2020

Changed API as it was proposed and approved in #41304

Closes #41304

@ghost
Copy link

ghost commented Aug 27, 2020

Tagging subscribers to this area: @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

@karelz karelz added this to the 6.0.0 milestone Aug 27, 2020
Copy link
Contributor

@scalablecory scalablecory left a comment

Choose a reason for hiding this comment

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

lgtm.

@CarnaViire CarnaViire merged commit 0b02200 into dotnet:master Aug 27, 2020
@CarnaViire CarnaViire deleted the issue-41304-accept-async-null branch August 27, 2020 16:21
@CarnaViire
Copy link
Member Author

/backport to release/5.0

@github-actions
Copy link
Contributor

Started backporting to release/5.0: https://github.com/dotnet/runtime/actions/runs/227328064

CarnaViire pushed a commit that referenced this pull request Aug 28, 2020
Co-authored-by: Natalia Kondratyeva <[email protected]>

Backport of #41442 to release/5.0

As it was discussed in #41304, with current System.Net.Connections APIs, listeners need to throw from AcceptAsync when shutting down since AcceptAsync cannot return null. This PR allows AcceptAsync to return null, to avoid unnecessary first-chance exceptions when listeners are gracefully shutting down.
@ghost ghost locked as resolved and limited conversation to collaborators Dec 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow ConnectionListener.AcceptAsync() to return null
4 participants