mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-03-28 15:40:54 +03:00
fix capture termination when in client creation
This commit is contained in:
@@ -182,7 +182,10 @@ async fn do_capture(
|
||||
|
||||
/* create barriers for active clients */
|
||||
for (handle, pos) in clients {
|
||||
capture.create(handle, to_capture_pos(pos)).await?;
|
||||
tokio::select! {
|
||||
r = capture.create(handle, to_capture_pos(pos)) => r?,
|
||||
_ = wait_for_termination(request_rx) => return Ok(()),
|
||||
}
|
||||
}
|
||||
|
||||
let res = do_capture_session(active, &mut capture, conn, event_tx, request_rx, service).await;
|
||||
|
||||
@@ -288,7 +288,10 @@ impl EmulationProxy {
|
||||
|
||||
// create active handles
|
||||
for &handle in handles.values() {
|
||||
emulation.create(handle).await;
|
||||
tokio::select! {
|
||||
_ = emulation.create(handle) => {},
|
||||
_ = wait_for_termination(request_rx) => return Ok(()),
|
||||
}
|
||||
}
|
||||
|
||||
let res = Self::do_emulation_session(&mut emulation, handles, next_id, request_rx).await;
|
||||
|
||||
Reference in New Issue
Block a user