mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-04-09 23:41:27 +03:00
properly terminate input capture
This commit is contained in:
@@ -184,19 +184,18 @@ async fn do_capture(
|
|||||||
});
|
});
|
||||||
|
|
||||||
/* create barriers for active clients */
|
/* create barriers for active clients */
|
||||||
if let Err(e) = create_clients(&mut capture, clients, request_rx).await {
|
let r = create_clients(&mut capture, clients, request_rx).await;
|
||||||
|
if let Err(e) = r {
|
||||||
capture.terminate().await?;
|
capture.terminate().await?;
|
||||||
return Err(e.into());
|
return Err(e.into());
|
||||||
}
|
}
|
||||||
|
|
||||||
if let Err(e) =
|
let r = do_capture_session(active, &mut capture, conn, event_tx, request_rx, service).await;
|
||||||
do_capture_session(active, &mut capture, conn, event_tx, request_rx, service).await
|
|
||||||
{
|
// FIXME replace with async drop when stabilized
|
||||||
// FIXME replace with async drop when stabilized
|
capture.terminate().await?;
|
||||||
capture.terminate().await?;
|
|
||||||
return Err(e);
|
r
|
||||||
}
|
|
||||||
Ok(())
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn create_clients(
|
async fn create_clients(
|
||||||
|
|||||||
Reference in New Issue
Block a user