Skip to content

Commit

Permalink
feat: server_sent_unsolicited_exists(): Log folder name
Browse files Browse the repository at this point in the history
  • Loading branch information
iequidoo committed Feb 4, 2024
1 parent 2aa5b17 commit 6c481e0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/imap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1925,13 +1925,14 @@ impl Session {
use async_imap::imap_proto::ResponseCode;
use UnsolicitedResponse::*;

let folder = self.selected_folder.as_deref().unwrap_or_default();
let mut unsolicited_exists = false;
while let Ok(response) = self.unsolicited_responses.try_recv() {
match response {
Exists(_) => {
info!(
context,
"Need to fetch again, got unsolicited EXISTS {:?}", response
"Need to refetch {folder:?}, got unsolicited EXISTS {response:?}"
);
unsolicited_exists = true;
}
Expand All @@ -1950,7 +1951,7 @@ impl Session {
) => {}

_ => {
info!(context, "got unsolicited response {:?}", response)
info!(context, "{folder:?}: got unsolicited response {response:?}")
}
}
}
Expand Down

0 comments on commit 6c481e0

Please sign in to comment.