Skip to content

Commit

Permalink
fix error propagation for nxdomain
Browse files Browse the repository at this point in the history
  • Loading branch information
DarienRaymond committed Feb 21, 2019
1 parent bb8465e commit f41b073
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/dns/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f41b073

Please sign in to comment.