Commit 7ade3d6
committed
fix(client): settle live listen state on connection reset; reset even when transport close rejects
A fresh connect (or close()) clears _listenState via _resetConnectionState
without settling the per-listen machines: when the prior transport never
fired onclose, an in-flight listen() promise from the old connection
hangs forever. Settle every live entry with a clear ConnectionClosed
error before clearing the map.
Also wrap super.close() in try/finally so a rejecting transport close
still resets per-connection state — a stale negotiated era / live listen
state must not survive a failed close.1 parent 7a5f2db commit 7ade3d6
1 file changed
Lines changed: 26 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
279 | 279 | | |
280 | 280 | | |
281 | 281 | | |
| 282 | + | |
| 283 | + | |
282 | 284 | | |
283 | 285 | | |
284 | 286 | | |
| |||
349 | 351 | | |
350 | 352 | | |
351 | 353 | | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
352 | 368 | | |
353 | 369 | | |
354 | 370 | | |
355 | 371 | | |
356 | 372 | | |
357 | | - | |
358 | | - | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
359 | 381 | | |
360 | 382 | | |
361 | 383 | | |
| |||
1401 | 1423 | | |
1402 | 1424 | | |
1403 | 1425 | | |
1404 | | - | |
| 1426 | + | |
| 1427 | + | |
1405 | 1428 | | |
1406 | 1429 | | |
1407 | 1430 | | |
| |||
0 commit comments