diff --git a/src/cli/manager.rs b/src/cli/manager.rs index c2fe5cb8..02ca146d 100644 --- a/src/cli/manager.rs +++ b/src/cli/manager.rs @@ -97,6 +97,13 @@ pub fn enable_thread_counter() -> bool { .is_present("enable-thread-counter"); } +pub fn enable_webrtc_task_test() -> bool { + return MANAGER + .as_ref() + .clap_matches + .is_present("enable-webrtc-task-test"); +} + // Return the command line used to start this application pub fn command_line_string() -> String { std::env::args().collect::>().join(" ") @@ -230,6 +237,12 @@ fn get_clap_matches<'a>() -> clap::ArgMatches<'a> { .long("enable-thread-counter") .help("Enable a thread that prints the number of children processes.") .takes_value(false), + ) + .arg( + clap::Arg::with_name("enable-webrtc-task-test") + .long("enable-webrtc-task-test") + .help("Enable webrtc thread test with limit of child tasks.") + .takes_value(false), ); matches.get_matches() diff --git a/src/main.rs b/src/main.rs index 030e1b61..f79cd93f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -38,6 +38,10 @@ async fn main() -> Result<(), std::io::Error> { helper::threads::start_thread_counter_thread(); } + if cli::manager::enable_webrtc_task_test() { + helper::develop::start_check_tasks_on_webrtc_reconnects(); + } + stream::webrtc::signalling_server::SignallingServer::default(); if let Err(error) = stream::manager::start_default() {