Small improvement

pull/160/head
M66B 6 years ago
parent 773b5660ab
commit eaf3ea4a7c

@ -151,13 +151,15 @@ public class MailService implements AutoCloseable {
} catch (MailConnectException ex) { } catch (MailConnectException ex) {
if (this.insecure) if (this.insecure)
try { try {
for (InetAddress iaddr : InetAddress.getAllByName(host)) InetAddress[] iaddrs = InetAddress.getAllByName(host);
try { if (iaddrs.length > 1)
_connect(context, iaddr.getHostAddress(), port, user, password); for (InetAddress iaddr : iaddrs)
return; try {
} catch (MessagingException ex1) { _connect(context, iaddr.getHostAddress(), port, user, password);
Log.w(ex1); return;
} } catch (MessagingException ex1) {
Log.w(ex1);
}
} catch (Throwable ex1) { } catch (Throwable ex1) {
Log.w(ex1); Log.w(ex1);
} }

Loading…
Cancel
Save