From b25b083866be7369af890e74a401b33767c856f2 Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Thu, 8 Nov 2018 20:45:48 -0800 Subject: [PATCH] do not stop on keep-alive timer if sink is not completly flushed --- src/h1/dispatcher.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/h1/dispatcher.rs b/src/h1/dispatcher.rs index cc9ec7217..f4dfdb219 100644 --- a/src/h1/dispatcher.rs +++ b/src/h1/dispatcher.rs @@ -432,7 +432,7 @@ where return Err(DispatchError::DisconnectTimeout); } else if timer.deadline() >= self.ka_expire { // check for any outstanding response processing - if self.state.is_empty() { + if self.state.is_empty() && self.flags.contains(Flags::FLUSHED) { if self.flags.contains(Flags::STARTED) { trace!("Keep-alive timeout, close connection"); self.flags.insert(Flags::SHUTDOWN);