mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-03-07 11:59:59 +03:00
terminate capture in all instances
This commit is contained in:
@@ -186,8 +186,17 @@ async fn do_capture(
|
||||
/* create barriers for active clients */
|
||||
for (handle, pos) in clients {
|
||||
tokio::select! {
|
||||
r = capture.create(handle, to_capture_pos(pos)) => r?,
|
||||
_ = wait_for_termination(request_rx) => return Ok(()),
|
||||
r = capture.create(handle, to_capture_pos(pos)) => match r {
|
||||
Ok(_) => {},
|
||||
Err(e) => {
|
||||
capture.terminate().await?;
|
||||
return Err(e.into());
|
||||
},
|
||||
},
|
||||
_ = wait_for_termination(request_rx) => {
|
||||
capture.terminate().await?;
|
||||
return Ok(());
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user