From 6a1d560f227294b0edfb7a6e11e4acbc75cd8015 Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Thu, 8 Nov 2018 09:30:53 -0800 Subject: [PATCH] fix keep-alive timer reset --- Cargo.toml | 5 ++--- src/h1/dispatcher.rs | 9 ++++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 23499bbf..fcc169b7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -36,9 +36,8 @@ cell = ["actix-net/cell"] [dependencies] actix = "0.7.5" -#actix-net = "0.1.1" -#actix-net = { path="../actix-net/" } -actix-net = { git="https://github.com/actix/actix-net.git" } +actix-net = "0.2.0" +#actix-net = { git="https://github.com/actix/actix-net.git" } base64 = "0.9" bitflags = "1.0" diff --git a/src/h1/dispatcher.rs b/src/h1/dispatcher.rs index fb30d881..cc9ec721 100644 --- a/src/h1/dispatcher.rs +++ b/src/h1/dispatcher.rs @@ -441,7 +441,8 @@ where if let Some(deadline) = self.config.client_disconnect_timer() { - timer.reset(deadline) + timer.reset(deadline); + let _ = timer.poll(); } else { return Ok(()); } @@ -455,10 +456,12 @@ where ))); } } else if let Some(deadline) = self.config.keep_alive_expire() { - timer.reset(deadline) + timer.reset(deadline); + let _ = timer.poll(); } } else { - timer.reset(self.ka_expire) + timer.reset(self.ka_expire); + let _ = timer.poll(); } } Ok(Async::NotReady) => (),