mirror of
https://github.com/fafhrd91/actix-web
synced 2025-02-24 21:03:21 +01:00
fix dispatcher panic on pending flush
fixes thread panic in actix-http-3.0.0-rc.3 #2655
This commit is contained in:
parent
f940653981
commit
1ce58ecb30
@ -931,10 +931,16 @@ where
|
|||||||
"dispatcher should not be in keep-alive phase if state is not none: {:?}",
|
"dispatcher should not be in keep-alive phase if state is not none: {:?}",
|
||||||
this.state,
|
this.state,
|
||||||
);
|
);
|
||||||
debug_assert!(
|
|
||||||
this.write_buf.is_empty(),
|
// Assert removed by @robjtede on account of issue #2655. There are cases where an I/O
|
||||||
"dispatcher should not be in keep-alive phase if write_buf is not empty",
|
// flush can be pending after entering the keep-alive state causing the subsequent flush
|
||||||
);
|
// wake up to panic here. This appears to be a Linux-only problem. Leaving original code
|
||||||
|
// below for posterity because a simple and reliable test could not be found to trigger
|
||||||
|
// the behavior.
|
||||||
|
// debug_assert!(
|
||||||
|
// this.write_buf.is_empty(),
|
||||||
|
// "dispatcher should not be in keep-alive phase if write_buf is not empty",
|
||||||
|
// );
|
||||||
|
|
||||||
// keep-alive timer has timed out
|
// keep-alive timer has timed out
|
||||||
if timer.as_mut().poll(cx).is_ready() {
|
if timer.as_mut().poll(cx).is_ready() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user