From 8908f5e8ffd80b81c37a27e7bd369017f423e191 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Duffeck?= Date: Thu, 5 Jun 2025 11:11:49 +0200 Subject: [PATCH] Explicitly stop the watcher after reading from it --- services/activitylog/pkg/service/service.go | 1 + 1 file changed, 1 insertion(+) diff --git a/services/activitylog/pkg/service/service.go b/services/activitylog/pkg/service/service.go index 2183bdb24a..c97c855b54 100644 --- a/services/activitylog/pkg/service/service.go +++ b/services/activitylog/pkg/service/service.go @@ -543,6 +543,7 @@ func (a *ActivitylogService) enforceMaxActivities(ctx context.Context, resourceI a.log.Error().Err(err).Str("resourceID", resourceID).Msg("could not watch") return } + defer watcher.Stop() var keys []string for update := range watcher.Updates() {