From 431dc61c9867e781a5f03c0bbe6f5d549dc7450a Mon Sep 17 00:00:00 2001 From: Paul van Tilburg Date: Sat, 17 Oct 2020 00:40:25 +0200 Subject: [PATCH] Dropping driver without quiting hangs the process --- src/main.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index e0ced7d..63c6193 100644 --- a/src/main.rs +++ b/src/main.rs @@ -102,7 +102,11 @@ async fn update_loop(mut rx: Receiver<()>) -> Result<()> { // Go to the My Autarco site and login println!("⚡ Logging in..."); - login(&driver).await.expect("Failed to log in"); + // FIXME: Just dropping the driver hangs the process? + if let Err(e) = login(&driver).await { + driver.quit().await?; + return Err(e); + } let mut last_updated = 0; loop {