@@ -420,12 +420,7 @@ class QUICStream implements ReadableWritablePair<Uint8Array, Uint8Array> {
420420 ) ;
421421 // This is idempotent and won't error even if it is already stopped
422422 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
429424 this . rejectReadableP ?.( reason ) ;
430425 this . dispatchEvent (
431426 new events . EventQUICStreamError ( {
@@ -600,10 +595,7 @@ class QUICStream implements ReadableWritablePair<Uint8Array, Uint8Array> {
600595 detail : e_ ,
601596 } ) ,
602597 ) ;
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 ;
607599 } else {
608600 const e_ = new errors . ErrorQUICStreamInternal (
609601 'Failed `streamRecv` on the readable stream' ,
@@ -687,7 +679,7 @@ class QUICStream implements ReadableWritablePair<Uint8Array, Uint8Array> {
687679 detail : e_ ,
688680 } ) ,
689681 ) ;
690- throw reason ;
682+ return ;
691683 } else {
692684 const e_ = new errors . ErrorQUICStreamInternal (
693685 'Local stream writable could not `streamSend`' ,
@@ -750,7 +742,7 @@ class QUICStream implements ReadableWritablePair<Uint8Array, Uint8Array> {
750742 ) ;
751743 // This fails the `close`, however no matter what
752744 // the writable stream is in a closed state.
753- throw reason ;
745+ return ;
754746 } else {
755747 // This could happen due to `InvalidStreamState`
756748 const e_ = new errors . ErrorQUICStreamInternal (
0 commit comments