1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-06-25 18:09:22 +02:00

Drop connection if request's payload is not fulle consumed #236

This commit is contained in:
Nikolay Kim
2018-05-21 18:54:17 -07:00
parent 577a509875
commit 90968d4333
2 changed files with 9 additions and 1 deletions

View File

@ -270,7 +270,12 @@ where
debug!("Error sending data: {}", err);
return Err(());
}
_ => (),
Ok(Async::Ready(_)) => {
// non consumed payload in that case close connection
if self.payload.is_some() && self.tasks.is_empty() {
return Ok(Async::Ready(false))
}
}
}
}