Remove ctrlc crate and some updates

- Removed ctrlc crate and use the tokio provided ctrl_c function.
- Updated some crates.
This commit is contained in:
BlackDex authored and Daniel García committed 2022-12-12 22:56:10 +01:00
1 parent 4f1928778a
commit 50c46f6e9a
3 files changed
+68 -93

No files matched your search

+4 -3
View File
@@ -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?;