Commit f3d8a55
committed
Fix data race in OnTrafficFromServer by cloning resp before channel send
The same v1.Struct pointer was sent to UpdateCacheChannel and returned
to GatewayD via gRPC. The UpdateCache goroutine mutated Fields while
gRPC serialized them concurrently, corrupting responses under load.1 parent 0611dcb commit f3d8a55
1 file changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
296 | 297 | | |
297 | 298 | | |
298 | 299 | | |
299 | | - | |
| 300 | + | |
300 | 301 | | |
301 | 302 | | |
302 | 303 | | |
| |||
0 commit comments