Commit 64fa136
committed
fix(client): listen() honors RequestOptions.signal
listen(filter, options?) is typed RequestOptions but only options.timeout
was honored; options.signal was silently ignored. The auto-open path
forwards connect's options into listen(), so a connect-time signal was
also dropped.
Honor options.signal in the state machine: an already-aborted signal
rejects synchronously (mirrors request()); an abort while `opening`
rejects the pending listen() promise with the signal's reason and tears
the wire down; an abort while `open` closes the subscription. The abort
listener is removed by settle() once the subscription has closed.1 parent c3ec4a8 commit 64fa136
2 files changed
Lines changed: 84 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1260 | 1260 | | |
1261 | 1261 | | |
1262 | 1262 | | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
| 1266 | + | |
1263 | 1267 | | |
1264 | 1268 | | |
1265 | 1269 | | |
| |||
1281 | 1285 | | |
1282 | 1286 | | |
1283 | 1287 | | |
| 1288 | + | |
1284 | 1289 | | |
1285 | 1290 | | |
1286 | 1291 | | |
| |||
1303 | 1308 | | |
1304 | 1309 | | |
1305 | 1310 | | |
| 1311 | + | |
| 1312 | + | |
| 1313 | + | |
1306 | 1314 | | |
1307 | 1315 | | |
1308 | 1316 | | |
| |||
1347 | 1355 | | |
1348 | 1356 | | |
1349 | 1357 | | |
| 1358 | + | |
| 1359 | + | |
| 1360 | + | |
| 1361 | + | |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
| 1365 | + | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
| 1372 | + | |
| 1373 | + | |
1350 | 1374 | | |
1351 | 1375 | | |
1352 | 1376 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
285 | 285 | | |
286 | 286 | | |
287 | 287 | | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
288 | 348 | | |
289 | 349 | | |
290 | 350 | | |
| |||
0 commit comments