aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugin/pkg/healthcheck/healthcheck.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/plugin/pkg/healthcheck/healthcheck.go b/plugin/pkg/healthcheck/healthcheck.go
index 870373fdd..29a904c34 100644
--- a/plugin/pkg/healthcheck/healthcheck.go
+++ b/plugin/pkg/healthcheck/healthcheck.go
@@ -123,6 +123,7 @@ func (uh *UpstreamHost) HealthCheckURL() {
if err != nil {
log.Printf("[WARNING] Host %s health check probe failed: %v", uh.Name, err)
+ atomic.AddInt32(&uh.Fails, 1)
return
}
@@ -132,6 +133,7 @@ func (uh *UpstreamHost) HealthCheckURL() {
if r.StatusCode < 200 || r.StatusCode >= 400 {
log.Printf("[WARNING] Host %s health check returned HTTP code %d", uh.Name, r.StatusCode)
+ atomic.AddInt32(&uh.Fails, 1)
return
}