From 9d1eefc38ff3bd1fa79ad33518c701b8e320f88b Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Sat, 15 Sep 2018 09:57:54 -0700 Subject: [PATCH] use 5 seconds keep-alive timer by default --- CHANGES.md | 4 ++++ src/server/http.rs | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index c764a5926..91e34ae34 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -6,6 +6,10 @@ * Use server `Keep-Alive` setting as slow request timeout. +### Changed + +* Use 5 seconds keep-alive timer by default. + ## [0.7.7] - 2018-09-11 diff --git a/src/server/http.rs b/src/server/http.rs index 948889f42..b6f577b02 100644 --- a/src/server/http.rs +++ b/src/server/http.rs @@ -70,7 +70,7 @@ where factory: Arc::new(f), host: None, backlog: 2048, - keep_alive: KeepAlive::Os, + keep_alive: KeepAlive::Timeout(5), shutdown_timeout: 30, exit: false, no_http2: false, @@ -131,7 +131,7 @@ where /// Set server keep-alive setting. /// - /// By default keep alive is set to a `Os`. + /// By default keep alive is set to a 5 seconds. pub fn keep_alive>(mut self, val: T) -> Self { self.keep_alive = val.into(); self