Fix(dns): set handler when resolver not nil
This commit is contained in:
parent
c1b5e4f561
commit
0dd2a6dee5
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue