From b83f3e5ea0ba49cbd36fe7877aa8bb5d4400a141 Mon Sep 17 00:00:00 2001 From: Alexander Krotov Date: Tue, 4 Aug 2020 01:00:00 +0300 Subject: [PATCH] imap: read all UID STORE responses Otherwise these FETCH responses will remain unread and may be confused with the actual FETCH response later. --- src/imap/mod.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/imap/mod.rs b/src/imap/mod.rs index b13cb0645..a8833ce15 100644 --- a/src/imap/mod.rs +++ b/src/imap/mod.rs @@ -970,7 +970,11 @@ impl Imap { if let Some(ref mut session) = &mut self.session { let query = format!("+FLAGS ({})", flag); match session.uid_store(uid_set, &query).await { - Ok(_) => {} + Ok(mut responses) => { + while let Some(_response) = responses.next().await { + // Read all the responses + } + } Err(err) => { warn!( context,