mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-05-26 20:49:55 +00:00
break from wait loop on empty taskset
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
1 parent
f79bd2ac72
commit
5950355348
1 file changed
+2
-2
@@ -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) => {},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user