From f0a28b916821cc608509d7b1678bbf591422457e Mon Sep 17 00:00:00 2001 From: link2xt Date: Tue, 3 Jan 2023 12:08:24 +0000 Subject: [PATCH] Log the error before triggering reconnect This way "Dropping an IMAP connection" message appears after the cause for connection drop. --- src/scheduler.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scheduler.rs b/src/scheduler.rs index 81d5e7be8..f575bbd4b 100644 --- a/src/scheduler.rs +++ b/src/scheduler.rs @@ -198,8 +198,8 @@ async fn fetch_idle(ctx: &Context, connection: &mut Imap, folder_config: Config) .await .context("prepare IMAP connection") { - connection.trigger_reconnect(ctx); warn!(ctx, "{:#}", err); + connection.trigger_reconnect(ctx); return connection.fake_idle(ctx, Some(watch_folder)).await; }