imap: don't try to connect in is_online()

Attempting to connect to the server when calling imap's is_online()
blocks the UI process, so don't.
async
Manos Pitsidianakis 2020-06-07 14:16:54 +03:00
parent b4dfc1f89d
commit 5435a4615e
Signed by: Manos Pitsidianakis
GPG Key ID: 73627C2F690DF710
1 changed files with 3 additions and 3 deletions

View File

@ -185,9 +185,9 @@ pub(self) fn try_lock<T>(
impl MailBackend for ImapType {
fn is_online(&self) -> Result<()> {
if let Ok(mut g) = try_lock(&self.connection, None) {
let _ = g.connect();
}
//if let Ok(mut g) = try_lock(&self.connection, None) {
// let _ = g.connect();
//}
try_lock(&self.uid_store.is_online, None)?.1.clone()
}