Commit 57680e3
committed
Fix concurrent sendMessage race by retrying on FAIL_NON_SERIALIZED
Replace tryEmitNext (fail-fast) with emitNext + busyLooping(100ms)
in ManagedStdioClientTransport.sendMessage().
The unicast sink's SinkManySerialized wrapper returns FAIL_NON_SERIALIZED
when two threads call tryEmitNext concurrently. busyLooping retries the
CAS spin instead of immediately failing, making concurrent sends safe.
Before: 19/20 test repetitions fail
After: 20/20 pass1 parent fb3633e commit 57680e3
File tree
1 file changed
+8
-3
lines changed- src/main/java/org/sonarsource/sonarqube/mcp/client
1 file changed
+8
-3
lines changedLines changed: 8 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
| 140 | + | |
| 141 | + | |
140 | 142 | | |
141 | 143 | | |
142 | | - | |
143 | | - | |
144 | | - | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
145 | 150 | | |
146 | 151 | | |
147 | 152 | | |
| |||
0 commit comments