Skip to content

Commit

Permalink
Merge pull request #1 from zegevlier/fix-windows
Browse files Browse the repository at this point in the history
Only use `socket.set_reuse_port` on supported operating systems
  • Loading branch information
inikulin authored Jan 25, 2024
2 parents 8409e91 + f4f7001 commit 61d607a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions foundations/src/telemetry/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ fn bind_socket(addr: SocketAddr) -> BootstrapResult<Socket> {
)?;

socket.set_reuse_address(true)?;
#[cfg(unix)]
socket.set_reuse_port(true)?;
socket.bind(&SockAddr::from(addr))?;
socket.listen(1024)?;
Expand Down

0 comments on commit 61d607a

Please sign in to comment.