From 458b7bf0e837d34da1c11a838869a1e2ad00aab0 Mon Sep 17 00:00:00 2001 From: Jan Trefil <8711792+htrefil@users.noreply.github.com> Date: Sat, 13 May 2023 18:00:14 +0200 Subject: [PATCH] Disable the Nagle algorithm --- rkvm-client/src/client.rs | 1 + rkvm-server/src/server.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/rkvm-client/src/client.rs b/rkvm-client/src/client.rs index d7d3838..373c299 100644 --- a/rkvm-client/src/client.rs +++ b/rkvm-client/src/client.rs @@ -38,6 +38,7 @@ pub async fn run( }; stream.set_linger(None).map_err(Error::Network)?; + stream.set_nodelay(false).map_err(Error::Network)?; log::info!("Connected to server"); diff --git a/rkvm-server/src/server.rs b/rkvm-server/src/server.rs index 977bbe1..b670dfb 100644 --- a/rkvm-server/src/server.rs +++ b/rkvm-server/src/server.rs @@ -142,6 +142,7 @@ async fn client( ) -> Result<(), ClientError> { let negotiate = async { stream.set_linger(None)?; + stream.set_nodelay(false)?; let stream = acceptor.accept(stream).await?; log::info!("{}: TLS connected", addr);