mirror of https://github.com/schollz/croc.git
fix deadlock
This commit is contained in:
parent
45cb545a82
commit
24fb8746a4
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue