break from wait loop on empty taskset
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
f79bd2ac72
commit
5950355348
1 changed files with 2 additions and 2 deletions
|
@ -127,8 +127,8 @@ async fn fini(server: &Arc<Server>, listener: UnixListener, mut tasks: JoinSet<(
|
|||
debug!("Waiting for requests to finish...");
|
||||
while server.metrics.requests_spawn_active.load(Ordering::Relaxed) > 0 {
|
||||
tokio::select! {
|
||||
_ = tasks.join_next() => {}
|
||||
() = sleep(FINI_POLL_INTERVAL) => {}
|
||||
task = tasks.join_next() => if task.is_none() { break; },
|
||||
() = sleep(FINI_POLL_INTERVAL) => {},
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue