-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
[main] guard agains empty Accept address #108616
Conversation
Tagging subscribers to this area: @dotnet/ncl |
src/libraries/System.Net.Sockets/src/System/Net/Sockets/SocketAsyncEventArgs.Unix.cs
Show resolved
Hide resolved
…t/pr-108334-to-main
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.
LGTM
/backport to /release/9.0-staging |
Started backporting to /release/9.0-staging: https://github.com/dotnet/runtime/actions/runs/12754845439 |
@wfurt an error occurred while backporting to "/release/9.0-staging", please check the run log for details! Error: The specified backport target branch "/release/9.0-staging" wasn't found in the repo. |
/backport to release/9.0-staging |
Started backporting to release/9.0-staging: https://github.com/dotnet/runtime/actions/runs/12754885863 |
Fixes #108026 and #102663
This is a speculative fix based on feedback from @pepone.
It seems like in some cases accept on macOS does not return valid peer address and we throw on background thread.
This adds some guarding agains that to prevent thread termination.
I don't think workaround from #102663 (comment) is needed.
We already call getpeername if RemoteEndPoint is accessed and remote address is not available. It seems like we do not need it for anything else in CreateAcceptSocket and descendants.