mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-05-19 01:53:56 +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:
parent
4f1928778a
commit
50c46f6e9a
3 changed files with 68 additions and 93 deletions
|
@ -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?;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue