Second ctrl-c forces application to stop directly
All checks were successful
Build and deploy / Build container and manifests (push) Successful in 5m21s
All checks were successful
Build and deploy / Build container and manifests (push) Successful in 5m21s
This commit is contained in:
parent
c7b0cfc888
commit
27f6119905
|
@ -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]
|
||||
|
|
Loading…
Reference in New Issue
Block a user