address @dignifiedquire comments

This commit is contained in:
holger krekel
2019-10-25 12:15:56 +02:00
parent bf7d57c560
commit b4464ab0a3

View File

@@ -1014,18 +1014,15 @@ impl Imap {
}; };
match res { match res {
Ok(true) => { Ok(true) => {
// println!("wait_keepalive returned data, idle-finished");
let _ = sender.send(Ok(())); let _ = sender.send(Ok(()));
break; break;
} }
Ok(false) => { Ok(false) => {} // continue loop
// println!("wait_keepalive returned no data, let's re-enter idle"); Err(err) => {
} let _ = sender.send(Err(imap::error::Error::Bad(format!(
Err(_err) => { "wait_keepalive failed {}",
// eprintln!("wait_keepalive returned error {} -- SHUTTING DOWN", _err); err
let _ = sender.send(Err(imap::error::Error::Bad( ))));
"wait_keepalive failed".to_string(),
)));
break; break;
} }
} }
@@ -1108,7 +1105,6 @@ impl Imap {
let mut watch = lock.lock().unwrap(); let mut watch = lock.lock().unwrap();
loop { loop {
println!("wait_timeout");
let res = cvar.wait_timeout(watch, seconds_to_wait).unwrap(); let res = cvar.wait_timeout(watch, seconds_to_wait).unwrap();
watch = res.0; watch = res.0;
if *watch { if *watch {
@@ -1118,7 +1114,6 @@ impl Imap {
break; break;
} }
} }
println!("wait_timeout ended");
*watch = false; *watch = false;
@@ -1149,7 +1144,6 @@ impl Imap {
do_fake_idle = false; do_fake_idle = false;
} }
} }
println!("do_fake_idle={}", do_fake_idle);
} }
} }