feat: run stuff in bg

This commit is contained in:
Xory 2025-12-13 14:40:09 +02:00
parent 0b4d668d41
commit ecb098e15b
2 changed files with 37 additions and 15 deletions

View file

@ -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(())
}