ignore requests with capture / emulation disabled

otherwise the server would hang when trying to enable clients
This commit is contained in:
Ferdinand Schober
2024-07-14 12:02:14 +02:00
parent bba9400ab1
commit 8e94a64570
3 changed files with 25 additions and 17 deletions

View File

@@ -61,9 +61,12 @@ async fn capture_task(
}
// allow cancellation
tokio::select! {
_ = server.capture_notified() => {},
_ = server.cancelled() => break,
loop {
tokio::select! {
_ = notify_rx.recv() => continue, /* need to ignore requests here! */
_ = server.capture_notified() => break,
_ = server.cancelled() => return,
}
}
}
}