fix error propagation for nxdomain

pull/1581/head v4.17.0
Darien Raymond 6 years ago
parent bb8465e1d6
commit f41b07395a
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

@ -241,13 +241,13 @@ func (s *Server) lookupIPInternal(domain string, option IPOption) ([]net.IP, err
if len(ips) > 0 {
return ips, nil
}
if err == dns.ErrEmptyResponse {
return nil, err
}
if err != nil {
newError("failed to lookup ip for domain ", domain, " at server ", client.Name()).Base(err).WriteToLog()
lastErr = err
}
if err != context.Canceled && err != context.DeadlineExceeded {
return nil, err
}
}
return nil, newError("returning nil for domain ", domain).Base(lastErr)

Loading…
Cancel
Save