made set_reuse_port unix only
All checks were successful
Rust/sat-rs/pipeline/head This commit looks good

This commit is contained in:
lkoester 2023-10-26 13:34:37 +02:00
parent 8cab8ab011
commit e75a145b0e

View File

@ -180,6 +180,7 @@ impl<
// Create a TCP listener bound to two addresses.
let socket = Socket::new(Domain::IPV4, Type::STREAM, None)?;
socket.set_reuse_address(cfg.reuse_addr)?;
#[cfg(unix)]
socket.set_reuse_port(cfg.reuse_port)?;
let addr = (cfg.addr).into();
socket.bind(&addr)?;