Second ctrl-c forces application to stop directly
All checks were successful
Build and deploy / Build container and manifests (push) Successful in 5m21s

This commit is contained in:
Dreaded_X 2025-04-20 00:26:23 +02:00
parent c7b0cfc888
commit 27f6119905
Signed by: Dreaded_X
GPG Key ID: 5A0CBFE3C3377FAA

View File

@ -31,7 +31,10 @@ async fn shutdown_task(token: CancellationToken) {
}
info!("Starting graceful shutdown");
token.cancel();
tokio::time::sleep(Duration::from_secs(5)).await;
select! {
_ = tokio::time::sleep(Duration::from_secs(5)) => {}
_ = tokio::signal::ctrl_c() => {}
}
}
#[tokio::main]