mirror of
https://github.com/fafhrd91/actix-web
synced 2025-08-31 17:07:01 +02:00
fix(actix-http): wake before return pending when read half disconnect and need to shutdown (#3665)
This commit is contained in:
@@ -1182,7 +1182,7 @@ where
|
|||||||
let state_is_none = inner_p.state.is_none();
|
let state_is_none = inner_p.state.is_none();
|
||||||
|
|
||||||
// read half is closed; we do not process any responses
|
// read half is closed; we do not process any responses
|
||||||
if inner_p.flags.contains(Flags::READ_DISCONNECT) && state_is_none {
|
if inner_p.flags.contains(Flags::READ_DISCONNECT) {
|
||||||
trace!("read half closed; start shutdown");
|
trace!("read half closed; start shutdown");
|
||||||
inner_p.flags.insert(Flags::SHUTDOWN);
|
inner_p.flags.insert(Flags::SHUTDOWN);
|
||||||
}
|
}
|
||||||
@@ -1216,6 +1216,9 @@ where
|
|||||||
inner_p.shutdown_timer,
|
inner_p.shutdown_timer,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if inner_p.flags.contains(Flags::SHUTDOWN) {
|
||||||
|
cx.waker().wake_by_ref();
|
||||||
|
}
|
||||||
Poll::Pending
|
Poll::Pending
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user