mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-03-07 11:59:59 +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();
|
||||
let task = &mut self.capture_task;
|
||||
log::debug!("waiting for capture to terminate...");
|
||||
let res = task.await.expect("libei task panic");
|
||||
log::debug!("done!");
|
||||
let res = if !task.is_finished() {
|
||||
task.await.expect("libei task panic")
|
||||
} else {
|
||||
Ok(())
|
||||
};
|
||||
self.terminated = true;
|
||||
log::debug!("done!");
|
||||
res
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user