mirror of https://github.com/fafhrd91/actix-web
fix(http): Wake Payload when feeding error or eof
Signed-off-by: Thales Fragoso <thales.fragoso@axiros.com>
This commit is contained in:
parent
d9f74dc1bd
commit
edc0c1926c
|
@ -2,6 +2,8 @@
|
|||
|
||||
## Unreleased
|
||||
|
||||
- Properly wake Payload receivers when feeding errors or EOF
|
||||
|
||||
## 3.11.1
|
||||
|
||||
- Prevent more hangs after client disconnects.
|
||||
|
|
|
@ -200,11 +200,13 @@ impl Inner {
|
|||
#[inline]
|
||||
fn set_error(&mut self, err: PayloadError) {
|
||||
self.err = Some(err);
|
||||
self.wake();
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn feed_eof(&mut self) {
|
||||
self.eof = true;
|
||||
self.wake();
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
@ -253,8 +255,7 @@ impl Inner {
|
|||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use std::task::Poll;
|
||||
use std::time::Duration;
|
||||
use std::{task::Poll, time::Duration};
|
||||
|
||||
use actix_rt::time::timeout;
|
||||
use actix_utils::future::poll_fn;
|
||||
|
|
Loading…
Reference in New Issue