Log the error before triggering reconnect

This way "Dropping an IMAP connection" message appears
after the cause for connection drop.
This commit is contained in:
link2xt
2023-01-03 12:08:24 +00:00
parent c8f0c6b5f6
commit f0a28b9168

View File

@@ -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;
}