diff --git a/Cargo.lock b/Cargo.lock index 385de894f..0db053dea 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3012,9 +3012,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.25.0" +version = "1.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8e00990ebabbe4c14c08aca901caed183ecd5c09562a12c824bb53d3c3fd3af" +checksum = "03201d01c3c27a29c8a5cee5b55a93ddae1ccf6f08f65365c2c918f8c1b76f64" dependencies = [ "autocfg", "bytes", @@ -3027,7 +3027,7 @@ dependencies = [ "signal-hook-registry", "socket2", "tokio-macros", - "windows-sys 0.42.0", + "windows-sys 0.45.0", ] [[package]] diff --git a/core/Cargo.toml b/core/Cargo.toml index 62ed5d08a..affa8f883 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -11,7 +11,7 @@ types = { package = "monitor_types", path = "../lib/types" } db = { package = "db_client", path = "../lib/db_client" } periphery = { package = "periphery_client", path = "../lib/periphery_client" } axum_oauth2 = { path = "../lib/axum_oauth2" } -tokio = { version = "1.25", features = ["full"] } +tokio = { version = "1.26", features = ["full"] } tokio-tungstenite = { version = "0.18", features=["native-tls"] } tokio-util = "0.7" axum = { version = "0.6", features = ["ws", "json"] } diff --git a/core/src/main.rs b/core/src/main.rs index 7cad6d0e1..f10663fef 100644 --- a/core/src/main.rs +++ b/core/src/main.rs @@ -19,7 +19,7 @@ mod ws; type ResponseResult = Result; #[tokio::main] -async fn main() { +async fn main() -> anyhow::Result<()> { let (config, spa_router) = config::load(); println!("starting monitor core on port {}...", config.port); @@ -42,6 +42,7 @@ async fn main() { axum::Server::bind(&get_socket_addr(config.port)) .serve(app.into_make_service()) - .await - .expect("monitor core axum server crashed"); + .await?; + + Ok(()) }