Skip to content

Commit

Permalink
📝 enable unix reuse port
Browse files Browse the repository at this point in the history
  • Loading branch information
Xudong-Huang committed Mar 4, 2024
1 parent 36c83ac commit 774990d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/net/tcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -376,8 +376,8 @@ impl TcpListener {
// windows not have reuse port but reuse address is not safe
listener.set_reuse_address(true)?;

// #[cfg(unix)]
// listener.set_reuse_port(true)?;
#[cfg(unix)]
listener.set_reuse_port(true)?;

listener.bind(&addr.into())?;
// for addr in addrs {
Expand Down

0 comments on commit 774990d

Please sign in to comment.