-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Clarify that send_to might fail in certain cases #37432
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
Conversation
|
Hm this doesn't panic, right? It'd return an error? |
|
This doesn't panic, it returns an error. In the linked issue |
|
My bad, updated now. |
src/libstd/net/udp.rs
Outdated
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.
I think that we may want to generalize this error to more than just this issue. It may be worth just mentioning that the returned addresses from ToSocketAddrs must match the IPv4 or IPv6-ness of the address the UDP socket is bound to. This problem isn't only related to localhost I believe.
|
Waiting for updates to @alexcrichton's feedback. |
|
Sorry, this fell off my radar. Updated now. |
|
@bors: r+ Thanks! |
|
📌 Commit 50bfc23 has been approved by |
Clarify that send_to might panic in certain cases Closes rust-lang#34202 r? @alexcrichton
Closes #34202
r? @alexcrichton