Trigger reconnection when failing to fetch existing messages

This commit is contained in:
link2xt
2023-01-03 12:08:45 +00:00
parent f0a28b9168
commit 468356b120
2 changed files with 2 additions and 0 deletions

View File

@@ -143,6 +143,7 @@ async fn inbox_loop(ctx: Context, started: Sender<()>, inbox_handlers: ImapConne
if !fetched_existing_msgs {
if let Err(err) = connection.fetch_existing_msgs(&ctx).await {
warn!(ctx, "Failed to fetch existing messages: {:#}", err);
connection.trigger_reconnect(&ctx);
}
}
}