From afe3540ea7b0e0b979b1710b6ca94d191313f304 Mon Sep 17 00:00:00 2001 From: Abhishek Date: Mon, 13 Jan 2025 11:23:56 +0530 Subject: [PATCH] Remove redundant check and typo correction --- subcommand/health-sync/checks.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/subcommand/health-sync/checks.go b/subcommand/health-sync/checks.go index 87ae2d05..f84d4ddf 100644 --- a/subcommand/health-sync/checks.go +++ b/subcommand/health-sync/checks.go @@ -166,15 +166,15 @@ func (c *Command) syncChecks(consulClient *api.Client, // if dataplane container exist and healthy then proceed to checking the other containers health if ok && overallDataplaneHealthStatus == ecs.HealthStatusHealthy { // - for name, healthStatus := range parsedContainers { + for _, healthStatus := range parsedContainers { // as soon as we find any unhealthy container, we can set the dataplane health to unhealthy - if healthStatus != ecs.HealthStatusHealthy && name != config.ConsulDataplaneContainerName { + if healthStatus != ecs.HealthStatusHealthy { overallDataplaneHealthStatus = ecs.HealthStatusUnhealthy break } } } else { - // If no dataplane container or dataplane container is not healthy set overall health to healthy + // If no dataplane container or dataplane container is not healthy set overall health to unhealthy overallDataplaneHealthStatus = ecs.HealthStatusUnhealthy }