From 9f7567c1d19c9573fd9da990bd0ad8b74c5f7294 Mon Sep 17 00:00:00 2001 From: Hocuri Date: Mon, 15 Jun 2020 14:48:14 +0200 Subject: [PATCH] Abort on failing imap configuring --- src/configure/mod.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/configure/mod.rs b/src/configure/mod.rs index 8be3d7284..0a17d3759 100644 --- a/src/configure/mod.rs +++ b/src/configure/mod.rs @@ -461,7 +461,10 @@ async fn try_imap_connections( .await .is_ok() { - return Ok(()); // we directly return here if it was autoconfig or the connection succeeded + return Ok(()); + } + if was_autoconfig { + bail!("autoconfig did not succeed"); } progress!(context, 670); @@ -495,7 +498,7 @@ async fn try_imap_connection( return Ok(()); } if was_autoconfig { - return Ok(()); + bail!("autoconfig did not succeed"); } progress!(context, 650 + variation * 30);