diff --git a/lib/internal/quic/core.js b/lib/internal/quic/core.js index fd73cbe6cb2dea..e4a378c4820da2 100644 --- a/lib/internal/quic/core.js +++ b/lib/internal/quic/core.js @@ -2585,6 +2585,7 @@ class QuicStream extends Duplex { highWaterMark, defaultEncoding, } = options; + super({ highWaterMark, defaultEncoding, @@ -2601,27 +2602,6 @@ class QuicStream extends Duplex { this._readableState.readingMore = true; this.on('pause', streamOnPause); - // See src/node_quic_stream.h for an explanation - // of the initial states for unidirectional streams. - if (this.unidirectional) { - if (session instanceof QuicServerSession) { - if (this.serverInitiated) { - // Close the readable side - this.push(null); - this.read(); - } else { - // Close the writable side - this.end(); - } - } else if (this.serverInitiated) { - // Close the writable side - this.end(); - } else { - this.push(null); - this.read(); - } - } - // The QuicStream writes are corked until kSetHandle // is set, ensuring that writes are buffered in JavaScript // until we have somewhere to send them.