diff --git a/src/imap.rs b/src/imap.rs index d01517bd8..a4409a15d 100644 --- a/src/imap.rs +++ b/src/imap.rs @@ -984,6 +984,11 @@ impl Imap { } // let's manually drop the StopSource if interrupt.is_some() { + // the imap thread provided us a stop token but might + // not have entered idle_wait yet, give it some time + // for that to happen. XXX handle this without extra wait + // https://github.com/deltachat/deltachat-core-rust/issues/925 + std::thread::sleep(Duration::from_millis(50)); eprintln!("low-level: dropping stop-source to interrupt idle"); std::mem::drop(interrupt) }