From 75c012f93710050c1191bb90e2304791d7507b47 Mon Sep 17 00:00:00 2001 From: u5surf Date: Tue, 23 Nov 2021 06:10:32 +0900 Subject: [PATCH] Turn on TCP NO_DELAY by default #322 --- src/config.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/config.rs b/src/config.rs index 403a0a2..59db5d3 100644 --- a/src/config.rs +++ b/src/config.rs @@ -53,7 +53,8 @@ impl Config { impl Default for Config { fn default() -> Self { - HttpConfig::default().into() + let conf: Self = HttpConfig::default().into(); + conf.set_tcp_no_delay(true) } } @@ -122,7 +123,7 @@ impl Config { /// Set TCP `NO_DELAY`. /// - /// Default: `false`. + /// Default: `true`. /// /// Note: Does nothing on `wasm-client` (or `native-client` on `wasm32`). pub fn set_tcp_no_delay(mut self, no_delay: bool) -> Self {