diff --git a/cmd/cli/dns_proxy.go b/cmd/cli/dns_proxy.go index 031b362..8b198a7 100644 --- a/cmd/cli/dns_proxy.go +++ b/cmd/cli/dns_proxy.go @@ -595,7 +595,7 @@ func (p *prog) proxy(ctx context.Context, req *proxyRequest) *proxyResponse { return res } ctrld.Log(ctx, mainLog.Load().Error(), "all %v endpoints failed", upstreams) - if cdUID != "" && p.leakOnUpstreamFailure() { + if p.leakOnUpstreamFailure() { p.leakingQueryMu.Lock() if !p.leakingQueryWasRun { p.leakingQueryWasRun = true diff --git a/cmd/cli/dns_proxy_test.go b/cmd/cli/dns_proxy_test.go index 9deb9ed..eae3dfa 100644 --- a/cmd/cli/dns_proxy_test.go +++ b/cmd/cli/dns_proxy_test.go @@ -75,6 +75,7 @@ func Test_canonicalName(t *testing.T) { func Test_prog_upstreamFor(t *testing.T) { cfg := testhelper.SampleConfig(t) + cfg.Service.LeakOnUpstreamFailure = func(v bool) *bool { return &v }(false) p := &prog{cfg: cfg} p.um = newUpstreamMonitor(p.cfg) p.lanLoopGuard = newLoopGuard()