1
1
Fork 0
mirror of https://github.com/schollz/croc.git synced 2025-10-11 05:11:06 +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)
}
for s := range result {
if s != "" {
ipaddress = s
for i := 0; i < len(publicDns); i++ {
ipaddress = <-result
if ipaddress != "" {
return
}
}