PLEASE PLEASE PLEASE

This commit is contained in:
snwy
2024-11-21 18:55:49 -08:00
parent 0ff41d37b6
commit cbf4cd9a46
2 changed files with 4 additions and 3 deletions

View File

@@ -800,6 +800,7 @@ function IncomingMessage(req, defaultIncomingOpts) {
this[abortedSymbol] = false;
this.complete = false;
Readable.$call(this);
this._readableState.autoDestroy = false;
var { type = "request", [kInternalRequest]: nodeReq } = defaultIncomingOpts || {};
this[reqSymbol] = req;
@@ -961,8 +962,8 @@ IncomingMessage.prototype = {
this[fakeSocketSymbol] = value;
},
};
$setPrototypeDirect.$call(IncomingMessage.prototype, Readable.prototype);
$setPrototypeDirect.$call(IncomingMessage, Readable);
Object.setPrototypeOf(IncomingMessage.prototype, Readable.prototype);
Object.setPrototypeOf(IncomingMessage, Readable);
async function consumeStream(self, reader: ReadableStreamDefaultReader) {
var done = false,

View File

@@ -66,7 +66,7 @@ try {
test("cork and uncork operations", done => {
const req = client.request();
let dataCallCount = 0;
let dataCallCount = 1;
req.on("data", () => {
dataCallCount++;
});