-
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
Unlike other variants, ReceiveFromAsync(saea) and ReceiveMessageFrom(saea) does not throw when socket is not bound #47714
Comments
Tagging subscribers to this area: @dotnet/ncl Issue DetailsWhen the socket not bound, all sync and async variants of We may want to change this for consistency.
|
We should fix the assert at the very least.
What does it do, just never complete? I think we should just change the behavior here to throw |
Exactly. |
Triage: it makes more sense to throw in advance for protocols that require binding, we should fix for 6.0. |
Triage: UDP corner case, fine to move to Future. |
When the socket not bound, all sync and async variants of
ReceiveFrom
andReceiveMessageFrom
seem to throwInvalidOperationException
.SocketAsyncEventArg
overloads fail withSocketError.InvalidArgument
instead. Furthermore:ReceiveMessageFrom
hits an assertion failure, and on UnixReceiveFrom
does not fail at all.I'm not sure if it's by design, or is it a something we want to change this for consistency.
The text was updated successfully, but these errors were encountered: