diff --git a/core/src/main/golang/native/app/dns.go b/core/src/main/golang/native/app/dns.go index 285ade09..d5af82a9 100644 --- a/core/src/main/golang/native/app/dns.go +++ b/core/src/main/golang/native/app/dns.go @@ -7,6 +7,10 @@ import ( ) func NotifyDnsChanged(dnsList string) { - dns.UpdateSystemDNS(strings.Split(dnsList, ",")) + var addr []string + if len(dnsList) > 0 { + addr = strings.Split(dnsList, ",") + } + dns.UpdateSystemDNS(addr) dns.FlushCacheWithDefaultResolver() }