mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-04-09 12:21:28 +03:00
simplify
This commit is contained in:
@@ -198,9 +198,6 @@ impl CaptureTask {
|
|||||||
if let Err(e) = self.do_capture().await {
|
if let Err(e) = self.do_capture().await {
|
||||||
log::warn!("input capture exited: {e}");
|
log::warn!("input capture exited: {e}");
|
||||||
}
|
}
|
||||||
if self.cancellation_token.is_cancelled() {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
loop {
|
loop {
|
||||||
tokio::select! {
|
tokio::select! {
|
||||||
r = self.request_rx.recv() => match r.expect("channel closed") {
|
r = self.request_rx.recv() => match r.expect("channel closed") {
|
||||||
@@ -209,7 +206,7 @@ impl CaptureTask {
|
|||||||
CaptureRequest::Destroy(h) => self.remove_capture(h),
|
CaptureRequest::Destroy(h) => self.remove_capture(h),
|
||||||
CaptureRequest::Release => { /* nothing to do */ }
|
CaptureRequest::Release => { /* nothing to do */ }
|
||||||
},
|
},
|
||||||
_ = self.cancellation_token.cancelled() => break,
|
_ = self.cancellation_token.cancelled() => return,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user