-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Fix the behavior of Socket.address
#50576
Comments
Since there is an easy mitigation and no broken Google tests this is probably fine. I do have concerns that some of our developer tools that historically don't have great test coverage could be broken. For example, Dart Dev Runner, Bolt, |
SGTM. Might be worth looking at #12693 at the same time. |
Ah, I noticed #12693 as well. I think that fixing just that part might be non-breaking but I'll take a look. |
lgtm |
Marking this as approved. |
@brianquinlan is this work still in flight? Is it planned for Dart 3? |
The bug that happened in 2019, still hasn't been fixed.. Can't P2P UDP HolePunch. plz.. Update. Thank you !!! |
Change
Socket.address
currently returns the sameInternetAddress
asSocket.remoteAddress
. Instead, it should return the local address that theSocket
was bound to.The original bug is:
dart:io, address getter of Socket returns wrong address
.Rationale
The current behavior is not useful. Instead, two connected sockets should have a relationship like:
There is a work-in-progress change in Gerrit.
Impact
It is hard to know how much existing code this will break. It does not break any Google tests and I would guess that it does not break much existing code.
Mitigation
Users can switch their code to use
Socket.remoteAddress
instead ofSocket.address
if they want the remote socket binding.The text was updated successfully, but these errors were encountered: