1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-27 10:17:18 +00:00

Fallback to usable addresses only

This commit is contained in:
M66B 2020-03-14 18:53:16 +01:00
parent b3b320a4ef
commit 97189ca6b6

View file

@ -417,18 +417,20 @@ public class EmailService implements AutoCloseable {
if (iaddr.equals(main))
continue;
if (!vpn) {
if (iaddr instanceof Inet4Address) {
if (ip4 || !has4)
continue;
ip4 = true;
}
if (iaddr instanceof Inet4Address) {
if (!has4)
continue;
if (!vpn && ip4)
continue;
ip4 = true;
}
if (iaddr instanceof Inet6Address) {
if (ip6 || !has6)
continue;
ip6 = true;
}
if (iaddr instanceof Inet6Address) {
if (!has6)
continue;
if (!vpn && ip6)
continue;
ip6 = true;
}
try {