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