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.
pull/234/head
Manos Pitsidianakis 4 years ago
parent b4dfc1f89d
commit 5435a4615e
No known key found for this signature in database
GPG Key ID: 73627C2F690DF710

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

Loading…
Cancel
Save