diff --git a/dns/server.go b/dns/server.go index 9649587d..2f8585c0 100644 --- a/dns/server.go +++ b/dns/server.go @@ -32,7 +32,7 @@ func (s *Server) setHandler(handler handler) { } func ReCreateServer(addr string, resolver *Resolver) error { - if addr == address { + if addr == address && resolver != nil { handler := newHandler(resolver) server.setHandler(handler) return nil