From 7512aac53e4768f81254971514a2a852f9c070e6 Mon Sep 17 00:00:00 2001 From: mkelvers Date: Wed, 6 May 2026 23:18:32 +0200 Subject: [PATCH] fix: race condition in worker waitgroup --- internal/worker/relations.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/worker/relations.go b/internal/worker/relations.go index e34d279..3165cbd 100644 --- a/internal/worker/relations.go +++ b/internal/worker/relations.go @@ -156,8 +156,8 @@ func (w *Worker) syncRelations(ctx context.Context) { var wg sync.WaitGroup for range workerCount { + wg.Add(1) go func() { - wg.Add(1) defer wg.Done() for a := range jobs { w.syncSingleAnime(ctx, a.ID)