From 9f36320d839026a95e8306637035762f05d36e17 Mon Sep 17 00:00:00 2001 From: cloudhead Date: Tue, 21 May 2024 12:34:38 +0200 Subject: [PATCH] node: Don't fail connection if TCP_NODELAY errors --- radicle-node/src/wire/protocol.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/radicle-node/src/wire/protocol.rs b/radicle-node/src/wire/protocol.rs index b04fb7ef..4a495e76 100644 --- a/radicle-node/src/wire/protocol.rs +++ b/radicle-node/src/wire/protocol.rs @@ -1108,7 +1108,11 @@ pub fn dial>( connection.set_read_timeout(Some(DEFAULT_CONNECTION_TIMEOUT))?; connection.set_write_timeout(Some(DEFAULT_CONNECTION_TIMEOUT))?; - connection.set_nodelay(true)?; + + // There are issues with setting TCP_NODELAY on WSL. Not a big deal. + if let Err(e) = connection.set_nodelay(true) { + log::warn!(target: "wire", "Unable to set TCP_NODELAY on fd {}: {e}", connection.as_raw_fd()); + } Ok(session::( remote_addr,