mirror of
https://github.com/actix/actix-web.git
synced 2025-01-03 13:58:44 +00:00
ensure poll_flush on h1 connection disconnect (#1974)
This commit is contained in:
parent
949d14ae2b
commit
dcad9724bc
1 changed files with 2 additions and 3 deletions
|
@ -841,9 +841,8 @@ where
|
|||
if inner.flags.contains(Flags::WRITE_DISCONNECT) {
|
||||
Poll::Ready(Ok(()))
|
||||
} else {
|
||||
// flush buffer
|
||||
inner.as_mut().poll_flush(cx)?;
|
||||
if !inner.write_buf.is_empty() {
|
||||
// flush buffer and wait on block.
|
||||
if inner.as_mut().poll_flush(cx)? {
|
||||
Poll::Pending
|
||||
} else {
|
||||
Pin::new(inner.project().io.as_mut().unwrap())
|
||||
|
|
Loading…
Reference in a new issue