fix deadlock

This commit is contained in:
Zack Scholl 2021-04-29 09:11:29 -07:00
parent 45cb545a82
commit 24fb8746a4
1 changed files with 3 additions and 3 deletions

View File

@ -69,9 +69,9 @@ func lookup(address string) (ipaddress string, err error) {
}(dns)
}
for s := range result {
if s != "" {
ipaddress = s
for i := 0; i < len(publicDns); i++ {
ipaddress = <-result
if ipaddress != "" {
return
}
}