From 0dd2a6dee5fdbf8598f47328ae44f81338b3fe8a Mon Sep 17 00:00:00 2001 From: Dreamacro <305009791@qq.com> Date: Mon, 15 Jul 2019 10:18:42 +0800 Subject: [PATCH] Fix(dns): set handler when resolver not nil --- dns/server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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