melib/imap: split by lines when reading IDLE unsolicited responses

pull/234/head
Manos Pitsidianakis 4 years ago
parent be2d268a20
commit 75f59ee726
No known key found for this signature in database
GPG Key ID: 73627C2F690DF710

@ -148,7 +148,9 @@ pub async fn idle(kit: ImapWatchKit) -> Result<()> {
let mut conn = timeout(Duration::from_secs(10), main_conn.lock()).await?;
conn.examine_mailbox(mailbox_hash, &mut response, false)
.await?;
conn.process_untagged(to_str!(&line)).await?;
for l in to_str!(&line).split_rn() {
conn.process_untagged(l).await?;
}
}
*uid_store.is_online.lock().unwrap() = (Instant::now(), Ok(()));
}

Loading…
Cancel
Save