Skip to content
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

Set SO_REUSEADDR on epoll tcp listener sockets #4544

Merged
merged 1 commit into from
Sep 11, 2024

Commits on Sep 10, 2024

  1. Set SO_REUSEADDR on epoll tcp listener sockets

    Unix is a bit more strict about TIME_WAIT state, and actually puts any sockets that have had a valid accept() called on them into the TIME_WAIT state.
    
    This makes writing a listener app difficult, as if that ever crashes the bind() will fail for the next few minutes.
    
    Pretty much all other TCP libraries set SO_REUSEADDR (Including libuv, which is what our app has used before). Libuv sets it on all TCP sockets, but its generally less required on client sockets, as they rarely actually specify a local port.
    ThadHouse committed Sep 10, 2024
    Configuration menu
    Copy the full SHA
    21d8366 View commit details
    Browse the repository at this point in the history