mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-03-21 12:10:55 +03:00
fix edge case where cancellation is not possible
This commit is contained in:
@@ -59,7 +59,12 @@ async fn capture_task(
|
||||
if server.is_cancelled() {
|
||||
break;
|
||||
}
|
||||
server.capture_notified().await;
|
||||
|
||||
// allow cancellation
|
||||
tokio::select! {
|
||||
_ = server.capture_notified() => {},
|
||||
_ = server.cancelled() => break,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user