From cbb821148b3a51c546c17033105aca2465c3912f Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Sun, 4 Mar 2018 20:14:58 -0800 Subject: [PATCH] explicitly set tcp nodelay --- src/server/channel.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/server/channel.rs b/src/server/channel.rs index 2416a3f66..390aaee87 100644 --- a/src/server/channel.rs +++ b/src/server/channel.rs @@ -32,9 +32,10 @@ pub struct HttpChannel where T: IoStream, H: HttpHandler + 'static { impl HttpChannel where T: IoStream, H: HttpHandler + 'static { pub(crate) fn new(settings: Rc>, - io: T, peer: Option, http2: bool) -> HttpChannel + mut io: T, peer: Option, http2: bool) -> HttpChannel { settings.add_channel(); + let _ = io.set_nodelay(true); if http2 { HttpChannel {