Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set SO_REUSEADDR on epoll tcp listener sockets (#4544)
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.
- Loading branch information