feat: improve logging of connection failures

Previously it was not always clear whether IMAP or SMTP connection
failed and what was the endpoint used.
This commit is contained in:
link2xt
2026-02-10 03:41:51 +00:00
committed by l
parent 9deba0cf2a
commit 624fc394d9
4 changed files with 7 additions and 7 deletions

View File

@@ -150,7 +150,7 @@ impl Client {
Err(err) => {
warn!(
context,
"Failed to connect to {host} ({resolved_addr}): {err:#}."
"IMAP failed to connect to {host} ({resolved_addr}): {err:#}."
);
Err(err)
}
@@ -161,7 +161,7 @@ impl Client {
context: &Context,
proxy_config: Option<ProxyConfig>,
strict_tls: bool,
candidate: ConnectionCandidate,
candidate: &ConnectionCandidate,
) -> Result<Self> {
let host = &candidate.host;
let port = candidate.port;