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:
139
Cargo.lock
generated
139
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
15
Cargo.toml
15
Cargo.toml
@ -66,10 +66,10 @@ dashmap = "5.4.0"
|
||||
|
||||
# Async futures
|
||||
futures = "0.3.25"
|
||||
tokio = { version = "1.22.0", features = ["rt-multi-thread", "fs", "io-util", "parking_lot", "time"] }
|
||||
tokio = { version = "1.23.0", features = ["rt-multi-thread", "fs", "io-util", "parking_lot", "time", "signal"] }
|
||||
|
||||
# A generic serialization/deserialization framework
|
||||
serde = { version = "1.0.148", features = ["derive"] }
|
||||
serde = { version = "1.0.150", features = ["derive"] }
|
||||
serde_json = "1.0.89"
|
||||
|
||||
# A safe, extensible ORM and Query builder
|
||||
@ -93,13 +93,13 @@ chrono-tz = "0.8.1"
|
||||
time = "0.3.17"
|
||||
|
||||
# Job scheduler
|
||||
job_scheduler_ng = "2.0.2"
|
||||
job_scheduler_ng = "2.0.3"
|
||||
|
||||
# Data encoding library Hex/Base32/Base64
|
||||
data-encoding = "2.3.2"
|
||||
data-encoding = "2.3.3"
|
||||
|
||||
# JWT library
|
||||
jsonwebtoken = "8.1.1"
|
||||
jsonwebtoken = "8.2.0"
|
||||
|
||||
# TOTP library
|
||||
totp-lite = "2.0.0"
|
||||
@ -136,7 +136,7 @@ cookie = "0.16.1"
|
||||
cookie_store = "0.19.0"
|
||||
|
||||
# Used by U2F, JWT and Postgres
|
||||
openssl = "0.10.43"
|
||||
openssl = "0.10.44"
|
||||
|
||||
# CLI argument parsing
|
||||
pico-args = "0.5.0"
|
||||
@ -145,9 +145,6 @@ pico-args = "0.5.0"
|
||||
paste = "1.0.9"
|
||||
governor = "0.5.1"
|
||||
|
||||
# Capture CTRL+C
|
||||
ctrlc = { version = "3.2.3", features = ["termination"] }
|
||||
|
||||
# Check client versions for specific features.
|
||||
semver = "1.0.14"
|
||||
|
||||
|
@ -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