Browse Source

melib/imap: check INBOX when pausing IDLE

jmap-eventsource
Manos Pitsidianakis 1 year ago
parent
commit
09684e821d
Signed by: epilys GPG Key ID: 73627C2F690DF710
  1. 7
      melib/src/backends/imap/watch.rs

7
melib/src/backends/imap/watch.rs

@ -150,10 +150,7 @@ pub async fn idle(kit: ImapWatchKit) -> Result<()> {
if now.duration_since(watch) >= _5_MINS {
/* Time to poll all inboxes */
let mut conn = timeout(uid_store.timeout, main_conn.lock()).await?;
for (h, mailbox) in mailboxes.clone() {
if mailbox_hash == h {
continue;
}
for (_h, mailbox) in mailboxes.clone() {
examine_updates(mailbox, &mut conn, &uid_store).await?;
}
watch = now;
@ -178,7 +175,7 @@ pub async fn idle(kit: ImapWatchKit) -> Result<()> {
.conn
.read_response(&mut response, RequiredResponses::empty())
.await?;
for l in line.split_rn() {
for l in line.split_rn().chain(response.split_rn()) {
debug!("process_untagged {:?}", &l);
if l.starts_with(b"+ ")
|| l.starts_with(b"* ok")

Loading…
Cancel
Save