fix branch condition on state change

This commit is contained in:
fakeshadow 2020-12-18 19:09:12 +08:00
parent fec029b574
commit 5afef13dc6
1 changed files with 4 additions and 2 deletions

View File

@ -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