mirror of
https://github.com/chatmail/core.git
synced 2026-04-28 10:56:29 +03:00
Remove confusing log "ignoring unsolicited response Recent(…)" (#3934)
It doesn't seem to add value and gives the impression that something went wrong.
This commit is contained in:
24
src/imap.rs
24
src/imap.rs
@@ -1740,17 +1740,37 @@ impl Session {
|
||||
/// If this returns `true`, this means that new emails arrived and you should
|
||||
/// fetch again, even if you just fetched.
|
||||
fn server_sent_unsolicited_exists(&self, context: &Context) -> Result<bool> {
|
||||
use async_imap::imap_proto::Response;
|
||||
use async_imap::imap_proto::ResponseCode;
|
||||
use UnsolicitedResponse::*;
|
||||
|
||||
let mut unsolicited_exists = false;
|
||||
while let Ok(response) = self.unsolicited_responses.try_recv() {
|
||||
match response {
|
||||
UnsolicitedResponse::Exists(_) => {
|
||||
Exists(_) => {
|
||||
info!(
|
||||
context,
|
||||
"Need to fetch again, got unsolicited EXISTS {:?}", response
|
||||
);
|
||||
unsolicited_exists = true;
|
||||
}
|
||||
_ => info!(context, "ignoring unsolicited response {:?}", response),
|
||||
|
||||
// We are not interested in the following responses and they are are
|
||||
// sent quite frequently, so, we ignore them without logging them
|
||||
Expunge(_) | Recent(_) => {}
|
||||
Other(response_data)
|
||||
if matches!(
|
||||
response_data.parsed(),
|
||||
Response::Fetch { .. }
|
||||
| Response::Done {
|
||||
code: Some(ResponseCode::CopyUid(_, _, _)),
|
||||
..
|
||||
}
|
||||
) => {}
|
||||
|
||||
_ => {
|
||||
info!(context, "got unsolicited response {:?}", response)
|
||||
}
|
||||
}
|
||||
}
|
||||
Ok(unsolicited_exists)
|
||||
|
||||
Reference in New Issue
Block a user