Skip to content

Commit

Permalink
src: Change main runtime to explicitly Tokio
Browse files Browse the repository at this point in the history
  • Loading branch information
joaoantoniocardoso authored and patrickelectric committed Jan 8, 2024
1 parent 15d5d08 commit 7614c36
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ mod stream;
mod video;
mod video_stream;

#[actix_web::main]
#[tokio::main(flavor = "multi_thread", worker_threads = 10)]
async fn main() -> Result<(), std::io::Error> {
// CLI should be started before logger to allow control over verbosity
cli::manager::init();
Expand All @@ -42,11 +42,13 @@ async fn main() -> Result<(), std::io::Error> {
helper::develop::start_check_tasks_on_webrtc_reconnects();
}

stream::webrtc::signalling_server::SignallingServer::default();
let _signalling_server = stream::webrtc::signalling_server::SignallingServer::default();

if let Err(error) = stream::manager::start_default().await {
error!("Failed to start default streams. Reason: {error:?}")
}

server::manager::run(&cli::manager::server_address()).await
server::manager::run(&cli::manager::server_address()).await?;

Ok(())
}

0 comments on commit 7614c36

Please sign in to comment.