From 895244aa4e7882280cb28ef71717f740e1d93951 Mon Sep 17 00:00:00 2001 From: soruh Date: Wed, 15 Feb 2023 13:41:54 +0100 Subject: [PATCH] use TCP_NODELAY --- src/main.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main.rs b/src/main.rs index 7f917e4..7c9aae0 100644 --- a/src/main.rs +++ b/src/main.rs @@ -603,6 +603,9 @@ async fn connection_handler( )?; } + stream.set_nodelay(true)?; + client.set_nodelay(true)?; + select! { _ = tokio::io::copy_bidirectional(stream, &mut client) => {} _ = sleep(CALL_TIMEOUT) => {}