Skip to content

Native networking should use SO_REUSEADDR where appropriate #11758

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

Closed
alexcrichton opened this issue Jan 23, 2014 · 2 comments
Closed

Native networking should use SO_REUSEADDR where appropriate #11758

alexcrichton opened this issue Jan 23, 2014 · 2 comments

Comments

@alexcrichton
Copy link
Member

Not doing so is causing spurious failures on the bots I believe. This is already done by libuv for us, and I think that libnative should do the same thing in order to keep the two in sync.

Last I looked, I think there's also some business with SO_REUSEPORT for udp sockets. Regardless, I think that we should mirror what libuv is doing for both tcp and udp.

@bnoordhuis
Copy link
Contributor

Apropos UDP, the SO_REUSEADDR flag lets the process steal the port from another process. Libuv does it for (bug-for-bug) backwards compatibility with node.js v0.4 but it's something of a questionable practice. Looking back at it, we should have made it opt-in.

If you're going to be feature compatible with libuv, then this comment may be useful.

@alexcrichton
Copy link
Member Author

Hm, sounds like we shouldn't be doing this. I also appear to have a misconception of what SO_REUSEADDR is, so for now I think we should leave these as-is.

I don't like the spurious failures, but with this in mind we should probably pursue another fix.

flip1995 pushed a commit to flip1995/rust that referenced this issue Nov 16, 2023
update references of old `msrvs` and `conf` paths

In rust-lang#11685, `clippy_lints::utils::conf` and `clippy_utils::msrvs` were moved to a separate `clippy_config` crate.
I noticed that not all references to those paths were updated, so this small PR intends to fix those.

changelog: none
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants