Dropping driver without quiting hangs the process

This commit is contained in:
Paul van Tilburg 2020-10-17 00:40:25 +02:00
parent b7ff296c65
commit 431dc61c98
1 changed files with 5 additions and 1 deletions

View File

@ -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 {