Skip to content

Commit

Permalink
properly terminate input capture
Browse files Browse the repository at this point in the history
  • Loading branch information
feschber committed Nov 7, 2024
1 parent 60fab82 commit 1f1d3f2
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions src/capture.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 1f1d3f2

Please sign in to comment.