diff --git a/core/services/ocr2/plugins/ocr2keeper/evm21/streams_lookup.go b/core/services/ocr2/plugins/ocr2keeper/evm21/streams_lookup.go index fb2821a74b7..af7ff42b930 100644 --- a/core/services/ocr2/plugins/ocr2keeper/evm21/streams_lookup.go +++ b/core/services/ocr2/plugins/ocr2keeper/evm21/streams_lookup.go @@ -151,11 +151,13 @@ func (r *EvmRegistry) streamsLookup(ctx context.Context, checkResults []ocr2keep var wg sync.WaitGroup for i, lookup := range lookups { - i := i wg.Add(1) - r.threadCtrl.Go(func(ctx context.Context) { - r.doLookup(ctx, &wg, lookup, i, checkResults, lggr) - }) + func(i int, lookup *StreamsLookup) { + r.threadCtrl.Go(func(ctx context.Context) { + r.doLookup(ctx, &wg, lookup, i, checkResults, lggr) + }) + }(i, lookup) + } wg.Wait()