From ffba95da5691912edea172bae80b062dacc63540 Mon Sep 17 00:00:00 2001 From: Christian Schneppe Date: Sat, 10 Feb 2018 19:38:40 +0100 Subject: skip empty srv records --- src/main/java/de/pixart/messenger/utils/Resolver.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/main/java/de') diff --git a/src/main/java/de/pixart/messenger/utils/Resolver.java b/src/main/java/de/pixart/messenger/utils/Resolver.java index 32ed1e7c7..8f8138cb3 100644 --- a/src/main/java/de/pixart/messenger/utils/Resolver.java +++ b/src/main/java/de/pixart/messenger/utils/Resolver.java @@ -99,6 +99,9 @@ public class Resolver { ResolverResult result = resolveWithFallback(dnsName, SRV.class); List results = new ArrayList<>(); for (SRV record : result.getAnswersOrEmptySet()) { + if (record.name.length() == 0 && record.priority == 0) { + continue; + } final boolean addedIPv4 = results.addAll(resolveIp(record, A.class, result.isAuthenticData(), directTls)); results.addAll(resolveIp(record, AAAA.class, result.isAuthenticData(), directTls)); if (!addedIPv4 && !Thread.currentThread().isInterrupted()) { -- cgit v1.2.3