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