mirror of
https://github.com/chatmail/core.git
synced 2026-04-17 21:46:35 +03:00
Do not panic on failure to read IMAP server greeting
This commit is contained in:
committed by
holger krekel
parent
15792d8426
commit
f81f3fb060
@@ -46,7 +46,7 @@ impl Client {
|
|||||||
let _greeting = client
|
let _greeting = client
|
||||||
.read_response()
|
.read_response()
|
||||||
.await
|
.await
|
||||||
.expect("failed to read greeting");
|
.ok_or_else(|| ImapError::Bad("failed to read greeting".to_string()))?;
|
||||||
|
|
||||||
Ok(Client::Secure(client))
|
Ok(Client::Secure(client))
|
||||||
}
|
}
|
||||||
@@ -61,7 +61,7 @@ impl Client {
|
|||||||
let _greeting = client
|
let _greeting = client
|
||||||
.read_response()
|
.read_response()
|
||||||
.await
|
.await
|
||||||
.expect("failed to read greeting");
|
.ok_or_else(|| ImapError::Bad("failed to read greeting".to_string()))?;
|
||||||
|
|
||||||
Ok(Client::Insecure(client))
|
Ok(Client::Insecure(client))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user