Skip to content

Commit b9a1333

Browse files
http: initialize kAbortController to null instead of undefined
1 parent 18f6103 commit b9a1333

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/_http_incoming.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ function IncomingMessage(socket) {
9393
// Flag for when we decide that this message cannot possibly be
9494
// read by the user, so there's no point continuing to handle it.
9595
this._dumped = false;
96-
this[kAbortController] = undefined;
96+
this[kAbortController] = null;
9797
}
9898
ObjectSetPrototypeOf(IncomingMessage.prototype, Readable.prototype);
9999
ObjectSetPrototypeOf(IncomingMessage, Readable);
@@ -192,7 +192,7 @@ ObjectDefineProperty(IncomingMessage.prototype, 'signal', {
192192
__proto__: null,
193193
configurable: true,
194194
get: function() {
195-
if (this[kAbortController] === undefined) {
195+
if (this[kAbortController] === null) {
196196
const ac = new AbortController();
197197
this[kAbortController] = ac;
198198
if (this.destroyed) {

0 commit comments

Comments
 (0)