mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-19 00:00:09 +02:00
time: panic in release mode when mark_pending called illegally (#5093)
This commit is contained in:
@@ -172,7 +172,12 @@ impl StateCell {
|
||||
let mut cur_state = self.state.load(Ordering::Relaxed);
|
||||
|
||||
loop {
|
||||
debug_assert!(cur_state < STATE_MIN_VALUE);
|
||||
// improve the error message for things like
|
||||
// https://github.com/tokio-rs/tokio/issues/3675
|
||||
assert!(
|
||||
cur_state < STATE_MIN_VALUE,
|
||||
"mark_pending called when the timer entry is in an invalid state"
|
||||
);
|
||||
|
||||
if cur_state > not_after {
|
||||
break Err(cur_state);
|
||||
|
||||
Reference in New Issue
Block a user