fix dnsList handle

This commit is contained in:
wwqgtxx 2024-10-06 00:56:02 +08:00
parent 7b828ee0d9
commit b7e4ff551a

View File

@ -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()
}