add more debugging

This commit is contained in:
holger krekel
2026-03-23 16:03:21 +01:00
parent 452ac8a1bc
commit 88d31d6b30
2 changed files with 7 additions and 1 deletions

View File

@@ -569,6 +569,7 @@ impl Imap {
info!(context, "No new emails in folder {folder:?}.");
return Ok(false);
}
info!(context, "Setting new_mail to False");
session.new_mail = false;
let mut read_cnt = 0;
@@ -1237,6 +1238,7 @@ impl Session {
// have been modified while our request was in progress.
// We may or may not have these new flags as a part of the response,
// so better skip next IDLE and do another round of flag synchronization.
info!(context, "got unsolicited fetch in folder");
self.new_mail = true;
}

View File

@@ -30,13 +30,17 @@ impl Session {
self.select_with_uidvalidity(context, folder).await?;
if self.drain_unsolicited_responses(context)? {
info!(
context,
"Setting new_mail to True"
);
self.new_mail = true;
}
if self.new_mail {
info!(
context,
"Skipping IDLE in {folder:?} because there may be new mail."
"YES YES YES Skipping IDLE in {folder:?} because there may be new mail."
);
return Ok(self);
}