feat: run stuff in bg
This commit is contained in:
parent
0b4d668d41
commit
ecb098e15b
2 changed files with 37 additions and 15 deletions
|
|
@ -11,6 +11,7 @@ async fn main() -> anyhow::Result<()> {
|
|||
log(LogLevel::Info, LOG_PATH, format!("[main] Skylink version 1.0.0 starting...")).await;
|
||||
let ws_tx: WsTx = Arc::new(Mutex::new(None));
|
||||
let ws_tx_for_handler = Arc::clone(&ws_tx);
|
||||
websocket_handler(ws_tx_for_handler).await;
|
||||
let handle = tokio::spawn(async { websocket_handler(ws_tx_for_handler).await });
|
||||
let _ = handle.await;
|
||||
Ok(())
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue