Fixed bug where after_startup_fn wasn't running
This commit is contained in:
parent
bbdb0c5689
commit
9b0b80518b
@ -1,6 +1,6 @@
|
||||
use std::{sync::Mutex};
|
||||
use std::sync::Mutex;
|
||||
use actix_web::{HttpServer, App, web};
|
||||
use crate::{r#do::shared_state::SharedStateObj};
|
||||
use crate::r#do::shared_state::SharedStateObj;
|
||||
use super::user_routes;
|
||||
|
||||
// This function is to be used in case code is meant to be run after server startup
|
||||
@ -49,6 +49,6 @@ pub async fn start_all_routes(after_startup_fn_call: &dyn Fn(), state: SharedSta
|
||||
|
||||
// Actual server start and after startup call
|
||||
let (server_start_result, _after_startup_value) =
|
||||
tokio::join!(server_future, async {after_startup_fn_call});
|
||||
tokio::join!(server_future, async {after_startup_fn_call()});
|
||||
return server_start_result; // Return server
|
||||
}
|
Loading…
Reference in New Issue
Block a user