imap: update is_online flag on successful read/write
parent
eca1921a8a
commit
c2300e8ea0
|
@ -410,6 +410,7 @@ impl ImapConnection {
|
|||
}
|
||||
}
|
||||
if self.stream.is_ok() {
|
||||
self.uid_store.is_online.lock().unwrap().0 = Instant::now();
|
||||
return Ok(());
|
||||
}
|
||||
let new_stream = ImapStream::new_connection(&self.server_conf);
|
||||
|
@ -503,6 +504,7 @@ impl ImapConnection {
|
|||
}
|
||||
if let Ok(ref mut stream) = self.stream {
|
||||
if let Ok(_) = action(stream) {
|
||||
self.uid_store.is_online.lock().unwrap().0 = Instant::now();
|
||||
return Ok(());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue