mirror of
https://github.com/chatmail/core.git
synced 2026-04-17 21:46:35 +03:00
better logging, changed timeout
This commit is contained in:
@@ -972,7 +972,7 @@ impl Imap {
|
||||
})
|
||||
}
|
||||
|
||||
pub fn interrupt_idle(&self) {
|
||||
pub fn interrupt_idle(&self, context: &Context) {
|
||||
task::block_on(async move {
|
||||
let mut interrupt: Option<stop_token::StopSource> = self.interrupt.lock().await.take();
|
||||
if interrupt.is_none() {
|
||||
@@ -988,8 +988,8 @@ impl Imap {
|
||||
// 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::thread::sleep(Duration::from_millis(200));
|
||||
info!(context, "low-level: dropping stop-source to interrupt idle");
|
||||
std::mem::drop(interrupt)
|
||||
}
|
||||
});
|
||||
|
||||
@@ -63,7 +63,7 @@ impl JobThread {
|
||||
|
||||
info!(context, "Interrupting {}-IDLE...", self.name);
|
||||
|
||||
self.imap.interrupt_idle();
|
||||
self.imap.interrupt_idle(context);
|
||||
|
||||
let &(ref lock, ref cvar) = &*self.state.clone();
|
||||
let mut state = lock.lock().unwrap();
|
||||
|
||||
Reference in New Issue
Block a user