Browse Source

melib/imap: examine all mailboxes before idle

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

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

@ -110,6 +110,12 @@ pub async fn idle(kit: ImapWatchKit) -> Result<()> {
let mailboxes_lck = timeout(uid_store.timeout, uid_store.mailboxes.lock()).await?;
mailboxes_lck.clone()
};
for (h, mailbox) in mailboxes.clone() {
if mailbox_hash == h {
continue;
}
examine_updates(mailbox, &mut conn, &uid_store).await?;
}
conn.send_command(b"IDLE").await?;
let mut blockn = ImapBlockingConnection::from(conn);
let mut watch = std::time::Instant::now();

Loading…
Cancel
Save