From f41b07395adeb480e3c478a56871414de2ea977b Mon Sep 17 00:00:00 2001 From: Darien Raymond Date: Thu, 21 Feb 2019 15:17:04 +0100 Subject: [PATCH] fix error propagation for nxdomain --- app/dns/server.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/dns/server.go b/app/dns/server.go index 4ed1ca617f..e4fc34eb39 100644 --- a/app/dns/server.go +++ b/app/dns/server.go @@ -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)