mirror of
https://github.com/chatmail/core.git
synced 2026-04-28 10:56:29 +03:00
feat: parallelize IMAP and SMTP connection attempts (#5915)
Previously for each connection candidate (essentially host and port pair) after resolving the host to a list of IPs Delta Chat iterated IP addresses one by one. Now for IMAP and SMTP we try up to 5 IP addresses in parallel. We start with one connection and add more connections later. If some connection fails, e.g. we try to connect to IPv6 on IPv4 network and get "Network is unreachable" (ENETUNREACH) error, we replace failed connection with another one immediately. Co-authored-by: Hocuri <hocuri@gmx.de>
This commit is contained in:
@@ -576,7 +576,7 @@ async fn get_autoconfig(
|
||||
|
||||
async fn nicer_configuration_error(context: &Context, e: String) -> String {
|
||||
if e.to_lowercase().contains("could not resolve")
|
||||
|| e.to_lowercase().contains("no dns resolution results")
|
||||
|| e.to_lowercase().contains("connection attempts")
|
||||
|| e.to_lowercase()
|
||||
.contains("temporary failure in name resolution")
|
||||
|| e.to_lowercase().contains("name or service not known")
|
||||
|
||||
Reference in New Issue
Block a user