diff --git a/tokio-util/src/sync/cancellation_token.rs b/tokio-util/src/sync/cancellation_token.rs index f193f6bc3..8a89698c4 100644 --- a/tokio-util/src/sync/cancellation_token.rs +++ b/tokio-util/src/sync/cancellation_token.rs @@ -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 {