From 0a544054f2c3471f3e3dfc82aa6ca682d53ea809 Mon Sep 17 00:00:00 2001 From: pk910 Date: Tue, 16 Apr 2024 21:37:57 +0200 Subject: [PATCH] fix `check_clients_are_healthy` --- pkg/coordinator/tasks/check_clients_are_healthy/task.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkg/coordinator/tasks/check_clients_are_healthy/task.go b/pkg/coordinator/tasks/check_clients_are_healthy/task.go index 4e4ab42..99b7321 100644 --- a/pkg/coordinator/tasks/check_clients_are_healthy/task.go +++ b/pkg/coordinator/tasks/check_clients_are_healthy/task.go @@ -128,9 +128,12 @@ func (t *Task) processCheck() { switch { case t.config.MaxUnhealthyCount > -1 && len(failedClients) >= t.config.MaxUnhealthyCount: - if t.config.FailOnCheckMiss { + switch { + case t.config.FailOnCheckMiss: t.ctx.SetResult(types.TaskResultFailure) - } else { + case resultPass: + t.ctx.SetResult(types.TaskResultSuccess) + default: t.ctx.SetResult(types.TaskResultNone) } case resultPass: