Skip to content

Commit

Permalink
optimize(healthz): continuously check failed and return failure state (
Browse files Browse the repository at this point in the history
…#2781)

Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
  • Loading branch information
3 people committed Feb 25, 2021
1 parent 70b44b2 commit a1a226a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/health/health.go
Expand Up @@ -64,6 +64,7 @@ func StartEndpointHealthCheck(endpointAddress string, opts ...Option) chan bool
if err != nil || resp.StatusCode() != options.successStatusCode {
failureCount++
if failureCount == options.failureThreshold {
failureCount--
ch <- false
}
} else {
Expand Down

0 comments on commit a1a226a

Please sign in to comment.