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:
@@ -540,8 +540,16 @@ func (s *Server) processUpstream(ctx *dnsContext) (rc resultCode) {
|
||||
}
|
||||
}
|
||||
|
||||
// request was not filtered so let it be processed further
|
||||
if ctx.err = s.dnsProxy.Resolve(d); ctx.err != nil {
|
||||
// Process the request further since it wasn't filtered.
|
||||
|
||||
prx := s.proxy()
|
||||
if prx == nil {
|
||||
ctx.err = srvClosedErr
|
||||
|
||||
return resultCodeError
|
||||
}
|
||||
|
||||
if ctx.err = prx.Resolve(d); ctx.err != nil {
|
||||
return resultCodeError
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user