From 12d8de8b54965b6376b0a245f855e4e64ec3e889 Mon Sep 17 00:00:00 2001 From: M66B Date: Tue, 30 Jan 2024 19:17:33 +0100 Subject: [PATCH] Revert "DNS retry custom" This reverts commit 689c557a020b63d0fbeb9b7039e941fb4de45c42. --- .../main/java/eu/faircode/email/DnsHelper.java | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/DnsHelper.java b/app/src/main/java/eu/faircode/email/DnsHelper.java index c28ba737a0..29b6f6ab02 100644 --- a/app/src/main/java/eu/faircode/email/DnsHelper.java +++ b/app/src/main/java/eu/faircode/email/DnsHelper.java @@ -55,7 +55,6 @@ import org.minidns.record.Record; import org.minidns.record.SRV; import org.minidns.record.TXT; import org.minidns.source.AbstractDnsDataSource; -import org.minidns.source.DnsDataSource; import org.minidns.util.MultipleIoException; import java.io.ByteArrayOutputStream; @@ -185,8 +184,6 @@ public class DnsHelper { ResolverApi resolver = DnssecResolverApi.INSTANCE; AbstractDnsClient client = resolver.getClient(); - DnsDataSource dataSource = client.getDataSource(); - if (false) { String private_dns = ConnectionHelper.getPrivateDnsServerName(context); Log.w("DNS private=" + private_dns); @@ -202,17 +199,7 @@ public class DnsHelper { ((DnssecClient) client).setUseHardcodedDnsServers(false); Log.i("DNS query name=" + type + ":" + name); - ResolverResult data; - try { - data = resolver.resolve(name, clazz); - } catch (Throwable ex) { - Log.w(ex); - if (dataSource == null || dataSource == client.getDataSource()) - throw ex; - Log.i("DNS retry custom"); - client.setDataSource(dataSource); - data = resolver.resolve(name, clazz); - } + ResolverResult data = resolver.resolve(name, clazz); Log.i("DNS resolved name=" + type + ":" + name + " success=" + data.wasSuccessful() + " rcode=" + data.getResponseCode()); @@ -220,7 +207,8 @@ public class DnsHelper { try { data.throwIfErrorResponse(); } catch (Throwable ex) { - Log.w("DNS error message=" + ex.getMessage()); + Log.e("DNS error message=" + ex.getMessage()); + Log.e(ex); throw ex; }