mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-15 00:00:15 +02:00
util: fix waker update condition in CancellationToken (#4497)
There was a missing exclamation mark in the condition we used to test whether we need a waker update in `check_for_cancellation`.
This commit is contained in:
@@ -824,7 +824,7 @@ impl CancellationTokenState {
|
||||
let need_waker_update = wait_node
|
||||
.task
|
||||
.as_ref()
|
||||
.map(|waker| waker.will_wake(cx.waker()))
|
||||
.map(|waker| !waker.will_wake(cx.waker()))
|
||||
.unwrap_or(true);
|
||||
|
||||
if need_waker_update {
|
||||
|
||||
Reference in New Issue
Block a user