diff --git a/go/vt/discovery/healthcheck.go b/go/vt/discovery/healthcheck.go index 5572e9a41d9..5d6a5e32662 100644 --- a/go/vt/discovery/healthcheck.go +++ b/go/vt/discovery/healthcheck.go @@ -774,7 +774,6 @@ func FilterTargetsByKeyspaces(keyspaces []string, targets []*query.Target) []*qu func (hc *HealthCheckImpl) waitForTablets(ctx context.Context, targets []*query.Target, requireServing bool) error { targets = FilterTargetsByKeyspaces(KeyspacesToWatch, targets) - var tabletHealths []*TabletHealth for { // We nil targets as we find them. allPresent := true @@ -783,6 +782,7 @@ func (hc *HealthCheckImpl) waitForTablets(ctx context.Context, targets []*query. continue } + var tabletHealths []*TabletHealth if requireServing { tabletHealths = hc.GetHealthyTabletStats(target) } else {