mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-04-13 08:51:26 +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 */
|
/* create barriers for active clients */
|
||||||
for (handle, pos) in clients {
|
for (handle, pos) in clients {
|
||||||
tokio::select! {
|
tokio::select! {
|
||||||
r = capture.create(handle, to_capture_pos(pos)) => r?,
|
r = capture.create(handle, to_capture_pos(pos)) => match r {
|
||||||
_ = wait_for_termination(request_rx) => return Ok(()),
|
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