Explicitly stop the watcher after reading from it

This commit is contained in:
André Duffeck
2025-06-05 11:11:49 +02:00
parent c9a704d446
commit 8908f5e8ff
@@ -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() {