@@ -420,12 +420,7 @@ class QUICStream implements ReadableWritablePair<Uint8Array, Uint8Array> {
420
420
) ;
421
421
// This is idempotent and won't error even if it is already stopped
422
422
this . readableController . error ( reason ) ;
423
- // This rejects the readableP if it exists
424
- // The pull method may be blocked by `await readableP`
425
- // When rejected, it will throw up the exception
426
- // However because the stream is errored, then
427
- // the exception has no effect, and any reads of this stream
428
- // will simply return `{ value: undefined, done: true }`
423
+ // This rejects the readableP if it exists to release it from it's blocked state
429
424
this . rejectReadableP ?.( reason ) ;
430
425
this . dispatchEvent (
431
426
new events . EventQUICStreamError ( {
@@ -600,10 +595,7 @@ class QUICStream implements ReadableWritablePair<Uint8Array, Uint8Array> {
600
595
detail : e_ ,
601
596
} ) ,
602
597
) ;
603
- // The pull doesn't need to throw it upwards, the controller.error
604
- // already ensures errored state, and any read operation will end up
605
- // throwing, but we do it here to be symmetric with write.
606
- throw reason ;
598
+ return ;
607
599
} else {
608
600
const e_ = new errors . ErrorQUICStreamInternal (
609
601
'Failed `streamRecv` on the readable stream' ,
@@ -687,7 +679,7 @@ class QUICStream implements ReadableWritablePair<Uint8Array, Uint8Array> {
687
679
detail : e_ ,
688
680
} ) ,
689
681
) ;
690
- throw reason ;
682
+ return ;
691
683
} else {
692
684
const e_ = new errors . ErrorQUICStreamInternal (
693
685
'Local stream writable could not `streamSend`' ,
@@ -750,7 +742,7 @@ class QUICStream implements ReadableWritablePair<Uint8Array, Uint8Array> {
750
742
) ;
751
743
// This fails the `close`, however no matter what
752
744
// the writable stream is in a closed state.
753
- throw reason ;
745
+ return ;
754
746
} else {
755
747
// This could happen due to `InvalidStreamState`
756
748
const e_ = new errors . ErrorQUICStreamInternal (
0 commit comments