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

master
Manos Pitsidianakis 2020-08-27 17:26:39 +03:00
parent be2d268a20
commit 75f59ee726
Signed by: Manos Pitsidianakis
GPG Key ID: 73627C2F690DF710
1 changed files with 3 additions and 1 deletions

View File

@ -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(()));
}