aboutsummaryrefslogtreecommitdiff
path: root/plugin/forward/forward.go
diff options
context:
space:
mode:
authorGravatar Pat Downey <patdowney@users.noreply.github.com> 2023-07-04 15:35:55 +0100
committerGravatar GitHub <noreply@github.com> 2023-07-04 16:35:55 +0200
commitea293da1d6bb0c4f598c8790c6941d56c79c0aa3 (patch)
tree9e808cf986b72673e2b9b176624cada501cd594e /plugin/forward/forward.go
parent6e1263d3d9ae1deef399df23d4ae47d2c3154e03 (diff)
downloadcoredns-ea293da1d6bb0c4f598c8790c6941d56c79c0aa3.tar.gz
coredns-ea293da1d6bb0c4f598c8790c6941d56c79c0aa3.tar.zst
coredns-ea293da1d6bb0c4f598c8790c6941d56c79c0aa3.zip
Fix forward metrics for backwards compatibility (#6178)
Diffstat (limited to 'plugin/forward/forward.go')
-rw-r--r--plugin/forward/forward.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugin/forward/forward.go b/plugin/forward/forward.go
index 927a6e21f..b3df8330f 100644
--- a/plugin/forward/forward.go
+++ b/plugin/forward/forward.go
@@ -97,7 +97,7 @@ func (f *Forward) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg
count := atomic.AddInt64(&(f.concurrent), 1)
defer atomic.AddInt64(&(f.concurrent), -1)
if count > f.maxConcurrent {
- MaxConcurrentRejectCount.Add(1)
+ maxConcurrentRejectCount.Add(1)
return dns.RcodeRefused, f.ErrLimitExceeded
}
}
@@ -129,7 +129,7 @@ func (f *Forward) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg
r := new(random)
proxy = r.List(f.proxies)[0]
- HealthcheckBrokenCount.Add(1)
+ healthcheckBrokenCount.Add(1)
}
if span != nil {
@@ -150,6 +150,7 @@ func (f *Forward) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg
for {
ret, err = proxy.Connect(ctx, state, opts)
+
if err == ErrCachedClosed { // Remote side closed conn, can only happen with TCP.
continue
}