imap: read all UID STORE responses

Otherwise these FETCH responses will remain unread and may be confused
with the actual FETCH response later.
This commit is contained in:
Alexander Krotov
2020-08-04 01:00:00 +03:00
committed by link2xt
parent 6c7d7f0c16
commit b83f3e5ea0

View File

@@ -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,