From 6957850a0a9297d1110302c743d7c3dafadd3d04 Mon Sep 17 00:00:00 2001 From: Zoltan Papp Date: Tue, 21 May 2024 14:33:05 +0200 Subject: [PATCH] Fix DNS change notification (#17) --- .../tool/src/main/java/io/netbird/client/tool/DNSWatch.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android/tool/src/main/java/io/netbird/client/tool/DNSWatch.java b/android/tool/src/main/java/io/netbird/client/tool/DNSWatch.java index 3f89d9e..51aad1b 100644 --- a/android/tool/src/main/java/io/netbird/client/tool/DNSWatch.java +++ b/android/tool/src/main/java/io/netbird/client/tool/DNSWatch.java @@ -89,7 +89,7 @@ private synchronized void onNewDNSList(LinkProperties linkProperties) { if(newDNSList.size() != dnsServers.size()) { DNSList dnsList = toDnsList(newDNSList); try { - notifyDnsWatcher(dnsServers); + notifyDnsWatcher(dnsList); dnsServers = dnsList; } catch (Exception e) { Log.e(LOGTAG, "failed to update dns servers", e); @@ -101,7 +101,7 @@ private synchronized void onNewDNSList(LinkProperties linkProperties) { try { if (!newDNSList.get(i).getHostAddress().equals(dnsServers.get(i))) { DNSList dnsList = toDnsList(newDNSList); - notifyDnsWatcher(dnsServers); + notifyDnsWatcher(dnsList); dnsServers = dnsList; return; }