Commit 1d1da89
committed
fix(grpc): capture loop variables in goroutine closure
Fix potential race condition by capturing loop variables 'index' and
'serviceCall' by value in the errgroup.Go() closure. Without this fix,
all goroutines could reference the same loop variables, leading to
concurrent access issues when processing gRPC service calls.
This addresses the race condition reported in cosmo router-tests when
processing recursive field resolvers with multiple levels of recursion
and aliases.1 parent 9909843 commit 1d1da89
1 file changed
+3
-0
lines changedLines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
116 | 119 | | |
117 | 120 | | |
118 | 121 | | |
| |||
0 commit comments