From e75a145b0e8b56776586be135ab77b3707085737 Mon Sep 17 00:00:00 2001 From: lkoester Date: Thu, 26 Oct 2023 13:34:37 +0200 Subject: [PATCH] made set_reuse_port unix only --- satrs-core/src/hal/std/tcp_server.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/satrs-core/src/hal/std/tcp_server.rs b/satrs-core/src/hal/std/tcp_server.rs index 184c4c1..deeb902 100644 --- a/satrs-core/src/hal/std/tcp_server.rs +++ b/satrs-core/src/hal/std/tcp_server.rs @@ -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)?;