imap: update is_online flag on successful read/write

memfd
Manos Pitsidianakis 2020-06-23 12:30:10 +03:00
parent eca1921a8a
commit c2300e8ea0
Signed by: Manos Pitsidianakis
GPG Key ID: 73627C2F690DF710
1 changed files with 2 additions and 0 deletions

View File

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