diff --git a/pkg/exporters/k8sexporter/condition/manager.go b/pkg/exporters/k8sexporter/condition/manager.go index 409d8e4f..7ed0bc21 100644 --- a/pkg/exporters/k8sexporter/condition/manager.go +++ b/pkg/exporters/k8sexporter/condition/manager.go @@ -110,10 +110,11 @@ func (c *conditionManager) GetConditions() []types.Condition { } func (c *conditionManager) syncLoop() { - updateCh := c.clock.Tick(updatePeriod) + ticker := c.clock.NewTicker(updatePeriod) + defer ticker.Stop() for { select { - case <-updateCh: + case <-ticker.C(): if c.needUpdates() || c.needResync() || c.needHeartbeat() { c.sync() }