Skip to content

Commit 0c9bd4f

Browse files
committed
fix: fixed bug where errors were thrown outside the usual stream path
[ci skip]
1 parent 94f3839 commit 0c9bd4f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/QUICStream.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -572,9 +572,9 @@ class QUICStream implements ReadableWritablePair<Uint8Array, Uint8Array> {
572572
try {
573573
await readableP;
574574
} catch (e) {
575-
// Abort this if `this.read` already processed `fin`
576-
if (e === abortReadablePReason) return;
577-
throw e;
575+
// If readableP was rejected then we just want to end early here,
576+
// anything rejecting it should already have errored the stream.
577+
return;
578578
}
579579
}
580580
let result: [number, boolean] | null;

0 commit comments

Comments
 (0)