Commit 9a571e9
Fix Go onClose deadlock by running state update in goroutine
The onClose callback acquires startStopMux, but Stop/ForceStop already
hold that lock while waiting for readLoop to finish via wg.Wait().
Running the state update in a goroutine allows readLoop to complete,
breaking the circular wait.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent c08e283 commit 9a571e9
1 file changed
Lines changed: 12 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1228 | 1228 | | |
1229 | 1229 | | |
1230 | 1230 | | |
1231 | | - | |
1232 | | - | |
1233 | | - | |
| 1231 | + | |
| 1232 | + | |
| 1233 | + | |
| 1234 | + | |
| 1235 | + | |
| 1236 | + | |
| 1237 | + | |
1234 | 1238 | | |
1235 | 1239 | | |
1236 | 1240 | | |
| |||
1348 | 1352 | | |
1349 | 1353 | | |
1350 | 1354 | | |
1351 | | - | |
1352 | | - | |
1353 | | - | |
| 1355 | + | |
| 1356 | + | |
| 1357 | + | |
| 1358 | + | |
| 1359 | + | |
1354 | 1360 | | |
1355 | 1361 | | |
1356 | 1362 | | |
| |||
0 commit comments