mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-24 15:11:03 +00:00
Small improvement
This commit is contained in:
parent
773b5660ab
commit
eaf3ea4a7c
1 changed files with 9 additions and 7 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue