Pull request: 3655 shutdown panic
Merge in DNS/adguard-home from 3655-stop-panic to master Updates #3655. Squashed commit of the following: commit 5ffe5193d79a82c70e3f9f547ba52ca20f7abdeb Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Wed Oct 6 13:06:33 2021 +0300 dnsforward: imp code, docs commit 3a4f04f50cd8e0d59edb9e3824f1d55bab9c73a6 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Tue Oct 5 16:42:25 2021 +0300 dnsforward: lock to read proxy
This commit is contained in:
@@ -249,9 +249,17 @@ func (s *Server) genBlockedHost(request *dns.Msg, newAddr string, d *proxy.DNSCo
|
||||
Req: &replReq,
|
||||
}
|
||||
|
||||
err := s.dnsProxy.Resolve(newContext)
|
||||
prx := s.proxy()
|
||||
if prx == nil {
|
||||
log.Debug("dns: %s", srvClosedErr)
|
||||
|
||||
return s.genServerFailure(request)
|
||||
}
|
||||
|
||||
err := prx.Resolve(newContext)
|
||||
if err != nil {
|
||||
log.Printf("Couldn't look up replacement host %q: %s", newAddr, err)
|
||||
log.Printf("couldn't look up replacement host %q: %s", newAddr, err)
|
||||
|
||||
return s.genServerFailure(request)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user