Skip to content

Commit

Permalink
Update protocol/daemons/server/types/health_checker.go
Browse files Browse the repository at this point in the history
Co-authored-by: ttl33 <19664986+ttl33@users.noreply.github.com>
  • Loading branch information
clemire and ttl33 authored Dec 7, 2023
1 parent b5e62a3 commit 80c481b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions protocol/daemons/server/types/health_checker.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,9 @@ func (hc *healthChecker) Poll() {
err := hc.healthCheckable.HealthCheck()
now := hc.timeProvider.Now()

// Capture healthy response.

if err == nil {
if err == nil { // Capture healthy response.
hc.mutableState.ReportSuccess(now)
} else {
} else { // Capture unhealthy response.
streakDuration := hc.mutableState.ReportFailure(now, err)
// If the service has been unhealthy for longer than the maximum acceptable unhealthy duration, execute the
// callback function.
Expand Down

0 comments on commit 80c481b

Please sign in to comment.