diff options
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main.rs b/src/main.rs index 08e223b7..57b8683a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -454,11 +454,12 @@ async fn launch_rocket(pool: db::DbPool, extra_debug: bool) -> Result<(), Error> .await?; CONFIG.set_rocket_shutdown_handle(instance.shutdown()); - ctrlc::set_handler(move || { + + tokio::spawn(async move { + tokio::signal::ctrl_c().await.expect("Error setting Ctrl-C handler"); info!("Exiting vaultwarden!"); CONFIG.shutdown(); - }) - .expect("Error setting Ctrl-C handler"); + }); let _ = instance.launch().await?; |