forked from mirrors/relay
More logging when ending main
This commit is contained in:
parent
8d0d39b1fc
commit
9272ba0d4c
1 changed files with 10 additions and 0 deletions
10
src/main.rs
10
src/main.rs
|
@ -94,6 +94,12 @@ fn init_subscriber(
|
|||
|
||||
#[actix_rt::main]
|
||||
async fn main() -> Result<(), anyhow::Error> {
|
||||
actix_rt::spawn(do_main()).await??;
|
||||
tracing::warn!("Application exit");
|
||||
Ok(())
|
||||
}
|
||||
|
||||
async fn do_main() -> Result<(), anyhow::Error> {
|
||||
dotenv::dotenv().ok();
|
||||
|
||||
let config = Config::build()?;
|
||||
|
@ -222,8 +228,12 @@ async fn main() -> Result<(), anyhow::Error> {
|
|||
.run()
|
||||
.await?;
|
||||
|
||||
tracing::warn!("Server closed");
|
||||
|
||||
drop(manager);
|
||||
|
||||
tracing::warn!("Main complete");
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue