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
parent
b4dfc1f89d
commit
5435a4615e
|
@ -185,9 +185,9 @@ pub(self) fn try_lock<T>(
|
||||||
|
|
||||||
impl MailBackend for ImapType {
|
impl MailBackend for ImapType {
|
||||||
fn is_online(&self) -> Result<()> {
|
fn is_online(&self) -> Result<()> {
|
||||||
if let Ok(mut g) = try_lock(&self.connection, None) {
|
//if let Ok(mut g) = try_lock(&self.connection, None) {
|
||||||
let _ = g.connect();
|
// let _ = g.connect();
|
||||||
}
|
//}
|
||||||
try_lock(&self.uid_store.is_online, None)?.1.clone()
|
try_lock(&self.uid_store.is_online, None)?.1.clone()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue