address #925 heuristically

This commit is contained in:
holger krekel
2019-12-01 11:58:33 +01:00
parent 3a08c92433
commit 2582791501

View File

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