0
0
Fork 0
mirror of https://github.com/schollz/croc.git synced 2025-10-11 13:21:00 +02:00

fix deadlock

This commit is contained in:
Zack Scholl 2021-04-29 09:11:29 -07:00
parent 45cb545a82
commit 24fb8746a4

View file

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