mirror of
https://github.com/M66B/FairEmail.git
synced 2026-01-05 20:34:49 +01:00
Small improvement
This commit is contained in:
@@ -151,13 +151,15 @@ public class MailService implements AutoCloseable {
|
||||
} catch (MailConnectException ex) {
|
||||
if (this.insecure)
|
||||
try {
|
||||
for (InetAddress iaddr : InetAddress.getAllByName(host))
|
||||
try {
|
||||
_connect(context, iaddr.getHostAddress(), port, user, password);
|
||||
return;
|
||||
} catch (MessagingException ex1) {
|
||||
Log.w(ex1);
|
||||
}
|
||||
InetAddress[] iaddrs = InetAddress.getAllByName(host);
|
||||
if (iaddrs.length > 1)
|
||||
for (InetAddress iaddr : iaddrs)
|
||||
try {
|
||||
_connect(context, iaddr.getHostAddress(), port, user, password);
|
||||
return;
|
||||
} catch (MessagingException ex1) {
|
||||
Log.w(ex1);
|
||||
}
|
||||
} catch (Throwable ex1) {
|
||||
Log.w(ex1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user