Explicitly stop the watcher after reading from it

This commit is contained in:
André Duffeck committed 2025-06-05 15:24:00 +02:00
1 parent c9a704d446
commit 8908f5e8ff
1 file changed
+1
@@ -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() {