From 80c481b1c961d16b87f0e591e856a8c3be89de8f Mon Sep 17 00:00:00 2001 From: Crystal Lemire Date: Thu, 7 Dec 2023 11:57:34 -0800 Subject: [PATCH] Update protocol/daemons/server/types/health_checker.go Co-authored-by: ttl33 <19664986+ttl33@users.noreply.github.com> --- protocol/daemons/server/types/health_checker.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/protocol/daemons/server/types/health_checker.go b/protocol/daemons/server/types/health_checker.go index 835b0a5ad0..9f2fb2113f 100644 --- a/protocol/daemons/server/types/health_checker.go +++ b/protocol/daemons/server/types/health_checker.go @@ -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.