tsdns: fix race in delegate

Signed-off-by: Dmytro Shynkevych <dmytro@tailscale.com>
pull/538/head
Dmytro Shynkevych 4 years ago
parent bd59bba8e6
commit 248d28671b
No known key found for this signature in database
GPG Key ID: FF5E2F3DAD97EA23

@ -266,7 +266,7 @@ func (r *Resolver) delegate(query []byte) ([]byte, error) {
nameservers := r.nameservers
r.mu.RUnlock()
if len(r.nameservers) == 0 {
if len(nameservers) == 0 {
return nil, errAllFailed
}

Loading…
Cancel
Save