From 1ff22c3deed2be27890b1aead7db2d8678a3ff28 Mon Sep 17 00:00:00 2001 From: lewis Date: Sun, 8 Feb 2026 17:04:33 +0200 Subject: [PATCH] fix: removed some bs --- .cargo/config.toml | 2 -- Cargo.toml | 2 +- crates/tranquil-ripple/src/transport.rs | 8 +++++--- 3 files changed, 6 insertions(+), 6 deletions(-) delete mode 100644 .cargo/config.toml diff --git a/.cargo/config.toml b/.cargo/config.toml deleted file mode 100644 index 7af97f1..0000000 --- a/.cargo/config.toml +++ /dev/null @@ -1,2 +0,0 @@ -[target.x86_64-unknown-linux-gnu] -rustflags = ["-C", "link-arg=-fuse-ld=mold"] diff --git a/Cargo.toml b/Cargo.toml index b3ee013..458b16b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -113,6 +113,6 @@ testcontainers-modules = { version = "0.14", features = ["postgres"] } wiremock = "0.6" [profile.release] -lto = "thin" +lto = "fat" strip = true codegen-units = 1 diff --git a/crates/tranquil-ripple/src/transport.rs b/crates/tranquil-ripple/src/transport.rs index 511d6f2..1c6a9cc 100644 --- a/crates/tranquil-ripple/src/transport.rs +++ b/crates/tranquil-ripple/src/transport.rs @@ -373,9 +373,11 @@ fn configure_socket(stream: &TcpStream) { if let Err(e) = sock_ref.set_tcp_nodelay(true) { tracing::warn!(error = %e, "failed to set TCP_NODELAY"); } - let params = socket2::TcpKeepalive::new() - .with_time(Duration::from_secs(30)) - .with_interval(Duration::from_secs(10)); + let keepalive = socket2::TcpKeepalive::new() + .with_time(Duration::from_secs(30)); + #[cfg(any(target_os = "linux", target_os = "macos", target_os = "windows"))] + let keepalive = keepalive.with_interval(Duration::from_secs(10)); + let params = keepalive; if let Err(e) = sock_ref.set_tcp_keepalive(¶ms) { tracing::warn!(error = %e, "failed to set TCP keepalive"); }