mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-11 04:26:38 +00:00
cros_async: Don't wake wakers on removal
There is no need to repoll the waker after it is canceled. This was a copy paste error that was harmless until tested with futures-rs combinators that re-use wakers aggressively. Change-Id: Ie84778b96ff6aa2b58bfe61cd96a78786797ad78 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2173971 Tested-by: Dylan Reid <dgreid@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com> Commit-Queue: Dylan Reid <dgreid@chromium.org> Reviewed-by: Stephen Barber <smbarber@chromium.org> Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>
This commit is contained in:
parent
aee62a8add
commit
f60fb14a72
1 changed files with 1 additions and 2 deletions
|
@ -186,9 +186,8 @@ impl FdWakerState {
|
|||
|
||||
// Remove the waker for the given token if it hasn't fired yet.
|
||||
fn cancel_waker(&mut self, token: WakerToken) -> Result<()> {
|
||||
if let Some((fd, waker)) = self.token_map.remove(&token.0) {
|
||||
if let Some((fd, _waker)) = self.token_map.remove(&token.0) {
|
||||
self.poll_ctx.delete(&fd).map_err(Error::PollContextError)?;
|
||||
waker.wake_by_ref();
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue