mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-03-21 12:10:55 +03:00
ignore requests with capture / emulation disabled
otherwise the server would hang when trying to enable clients
This commit is contained in:
@@ -61,9 +61,12 @@ async fn capture_task(
|
||||
}
|
||||
|
||||
// allow cancellation
|
||||
tokio::select! {
|
||||
_ = server.capture_notified() => {},
|
||||
_ = server.cancelled() => break,
|
||||
loop {
|
||||
tokio::select! {
|
||||
_ = notify_rx.recv() => continue, /* need to ignore requests here! */
|
||||
_ = server.capture_notified() => break,
|
||||
_ = server.cancelled() => return,
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user