From 4d2475c4e1bf90bbdceb02fdc099f5fc36a05abe Mon Sep 17 00:00:00 2001 From: Markus Opolka Date: Mon, 13 Jul 2026 11:18:55 +0200 Subject: [PATCH] Fix heartbeat ticker stopping after unsuccessful connection --- internal/gc/gc.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/gc/gc.go b/internal/gc/gc.go index 2f87619..3f6ebbc 100644 --- a/internal/gc/gc.go +++ b/internal/gc/gc.go @@ -140,7 +140,8 @@ func (g *GarbageCollector) heartbeat(ctx context.Context) { if errSvc != nil { g.logger.Error("Could not fetch heartbeat service from Icinga", "component", "gc", "error", errSvc.Error()) - return + // Skip this tick, we will try next time + continue } action := icinga2.Action{ @@ -152,7 +153,8 @@ func (g *GarbageCollector) heartbeat(ctx context.Context) { if errProcess != nil { g.logger.Error("Could not process-check-result for heartbeat", "component", "gc", "error", errProcess.Error()) - return + // Skip this tick, we will try next time + continue } g.logger.Info("Successfully sent heartbeat to Icinga", "component", "gc", "service", g.serviceName)