mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-06-16 08:45:14 +00:00
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:
@ -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?;
|
||||
|
||||
|
Reference in New Issue
Block a user