Skip to content

Commit

Permalink
fix dnsList handle
Browse files Browse the repository at this point in the history
  • Loading branch information
wwqgtxx committed Oct 5, 2024
1 parent 7b828ee commit b7e4ff5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion core/src/main/golang/native/app/dns.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}

0 comments on commit b7e4ff5

Please sign in to comment.