Skip to content

Commit

Permalink
Merge pull request #51 from madsmtm/cfg-set_reuse_port
Browse files Browse the repository at this point in the history
Use the same cfg-gate on Socket::set_reuse_port as their documentation
  • Loading branch information
willstott101 authored Jul 19, 2024
2 parents c43829a + ee6b5e2 commit 610309e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/address_family.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ pub trait AddressFamily {
socket.set_reuse_address(true)?;
socket.set_nonblocking(true)?;

#[cfg(not(windows))]
#[cfg(not(target_os = "illumos"))]
#[cfg(all(unix, not(any(target_os = "solaris", target_os = "illumos"))))]
socket.set_reuse_port(true)?;

socket.bind(&addr)?;
Expand Down

0 comments on commit 610309e

Please sign in to comment.