From 5afef13dc6ac4d3b218c16e48f5aee8336f542a8 Mon Sep 17 00:00:00 2001 From: fakeshadow <24548779@qq.com> Date: Fri, 18 Dec 2020 19:09:12 +0800 Subject: [PATCH] fix branch condition on state change --- actix-http/src/h1/dispatcher.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/actix-http/src/h1/dispatcher.rs b/actix-http/src/h1/dispatcher.rs index fe1b8da22..4a30d5abf 100644 --- a/actix-http/src/h1/dispatcher.rs +++ b/actix-http/src/h1/dispatcher.rs @@ -450,8 +450,10 @@ where }; // state is changed and continue when the state is not Empty - if state_change && !self.state.is_empty() { - continue; + if state_change { + if !self.state.is_empty() { + continue; + } } else { // if read-backpressure is enabled and we consumed some data. // we may read more data and retry