Skip to content

Commit

Permalink
helper: develop: Exit program if fail to connect with driver
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick José Pereira <[email protected]>
  • Loading branch information
patrickelectric committed Dec 1, 2023
1 parent ce814c5 commit b05d7e0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/helper/develop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ async fn task(mut counter: i32) -> Result<()> {
let port = cli::manager::enable_webrtc_task_test().unwrap();
let driver = WebDriver::new(&format!("http://localhost:{}", port), caps)
.await
.expect("Failed to create web driver.");
.unwrap_or_else(|_| {
error!("Failed to connect with WebDriver.");
std::process::exit(-1)
});

driver
.goto("http://0.0.0.0:6020/webrtc/index.html")
Expand Down

0 comments on commit b05d7e0

Please sign in to comment.