Commit c3ec4a8
committed
fix(client): settle() drops _listenState by the captured id, not via parked
When a server-cancel (or any termination) is delivered synchronously
inside _parkRequest's send — in-process transports — settle() runs before
`parked` is assigned, so the previous `_listenState.delete(parked.messageId)`
was skipped and the entry registered by onBeforeSend leaked. The catch-up
after _parkRequest only called parked.unpark(), not the delete.
Capture the messageId in the onBeforeSend closure as `listenMessageId`;
settle() and wireTeardown() key off that, so the entry is dropped on every
exit path regardless of whether `parked` has been assigned yet.1 parent 9a8bf5b commit c3ec4a8
2 files changed
Lines changed: 54 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1274 | 1274 | | |
1275 | 1275 | | |
1276 | 1276 | | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
| 1282 | + | |
1277 | 1283 | | |
1278 | 1284 | | |
1279 | 1285 | | |
| |||
1297 | 1303 | | |
1298 | 1304 | | |
1299 | 1305 | | |
1300 | | - | |
1301 | | - | |
1302 | | - | |
| 1306 | + | |
| 1307 | + | |
1303 | 1308 | | |
| 1309 | + | |
1304 | 1310 | | |
1305 | 1311 | | |
1306 | 1312 | | |
| |||
1321 | 1327 | | |
1322 | 1328 | | |
1323 | 1329 | | |
1324 | | - | |
| 1330 | + | |
1325 | 1331 | | |
1326 | 1332 | | |
1327 | 1333 | | |
| |||
1359 | 1365 | | |
1360 | 1366 | | |
1361 | 1367 | | |
| 1368 | + | |
1362 | 1369 | | |
1363 | 1370 | | |
1364 | 1371 | | |
| |||
1369 | 1376 | | |
1370 | 1377 | | |
1371 | 1378 | | |
1372 | | - | |
1373 | | - | |
| 1379 | + | |
| 1380 | + | |
| 1381 | + | |
| 1382 | + | |
1374 | 1383 | | |
1375 | 1384 | | |
1376 | 1385 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
228 | 228 | | |
229 | 229 | | |
230 | 230 | | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
231 | 267 | | |
232 | 268 | | |
233 | 269 | | |
| |||
242 | 278 | | |
243 | 279 | | |
244 | 280 | | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
245 | 284 | | |
246 | 285 | | |
247 | 286 | | |
| |||
0 commit comments