mirror of
https://github.com/chatmail/core.git
synced 2026-04-26 09:56:35 +03:00
add more debugging
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user