Skip to content

Commit

Permalink
simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
feschber committed Nov 8, 2024
1 parent ef2b2a7 commit d30bd81
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/capture.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,6 @@ impl CaptureTask {
if let Err(e) = self.do_capture().await {
log::warn!("input capture exited: {e}");
}
if self.cancellation_token.is_cancelled() {
break;
}
loop {
tokio::select! {
r = self.request_rx.recv() => match r.expect("channel closed") {
Expand All @@ -209,7 +206,7 @@ impl CaptureTask {
CaptureRequest::Destroy(h) => self.remove_capture(h),
CaptureRequest::Release => { /* nothing to do */ }
},
_ = self.cancellation_token.cancelled() => break,
_ = self.cancellation_token.cancelled() => return,
}
}
}
Expand Down

0 comments on commit d30bd81

Please sign in to comment.