mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-04-19 01:11:29 +03:00
fix poll after completion error
This commit is contained in:
committed by
Ferdinand Schober
parent
7fa74811e8
commit
fa8c6e3b1c
@@ -587,9 +587,13 @@ impl LanMouseInputCapture for LibeiInputCapture<'_> {
|
|||||||
self.cancellation_token.cancel();
|
self.cancellation_token.cancel();
|
||||||
let task = &mut self.capture_task;
|
let task = &mut self.capture_task;
|
||||||
log::debug!("waiting for capture to terminate...");
|
log::debug!("waiting for capture to terminate...");
|
||||||
let res = task.await.expect("libei task panic");
|
let res = if !task.is_finished() {
|
||||||
log::debug!("done!");
|
task.await.expect("libei task panic")
|
||||||
|
} else {
|
||||||
|
Ok(())
|
||||||
|
};
|
||||||
self.terminated = true;
|
self.terminated = true;
|
||||||
|
log::debug!("done!");
|
||||||
res
|
res
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user