1
0
mirror of https://github.com/fafhrd91/actix-web synced 2024-11-28 10:02:38 +01:00

do not stop on keep-alive timer if sink is not completly flushed

This commit is contained in:
Nikolay Kim 2018-11-08 20:45:48 -08:00
parent dea39030bc
commit b25b083866

View File

@ -432,7 +432,7 @@ where
return Err(DispatchError::DisconnectTimeout); return Err(DispatchError::DisconnectTimeout);
} else if timer.deadline() >= self.ka_expire { } else if timer.deadline() >= self.ka_expire {
// check for any outstanding response processing // 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) { if self.flags.contains(Flags::STARTED) {
trace!("Keep-alive timeout, close connection"); trace!("Keep-alive timeout, close connection");
self.flags.insert(Flags::SHUTDOWN); self.flags.insert(Flags::SHUTDOWN);