From 821c487530f09bb53f73f9c2c13682f4c4154f4a Mon Sep 17 00:00:00 2001 From: atlowChemi Date: Mon, 26 Jun 2023 10:10:24 +0300 Subject: [PATCH] CR --- lib/_http_server.js | 3 ++- lib/https.js | 2 +- lib/internal/http2/core.js | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/_http_server.js b/lib/_http_server.js index 67c28e2d3a2d1f..0242e7a089dd6f 100644 --- a/lib/_http_server.js +++ b/lib/_http_server.js @@ -24,6 +24,7 @@ const { ArrayIsArray, Error, + FunctionPrototypeCall, MathMin, ObjectKeys, ObjectSetPrototypeOf, @@ -560,7 +561,7 @@ Server.prototype.close = function() { }; Server.prototype[SymbolAsyncDispose] = async function() { - return promisify(this.close).call(this); + return FunctionPrototypeCall(promisify(this.close), this); }; Server.prototype.closeAllConnections = function() { diff --git a/lib/https.js b/lib/https.js index e3acde5ab663bb..d8b42c85493f7e 100644 --- a/lib/https.js +++ b/lib/https.js @@ -113,7 +113,7 @@ Server.prototype.close = function() { }; Server.prototype[SymbolAsyncDispose] = async function() { - return promisify(this.close).call(this); + return FunctionPrototypeCall(promisify(this.close), this); }; /** diff --git a/lib/internal/http2/core.js b/lib/internal/http2/core.js index 7fce6a21585648..fe104f52a38ed8 100644 --- a/lib/internal/http2/core.js +++ b/lib/internal/http2/core.js @@ -3192,7 +3192,7 @@ class Http2Server extends NETServer { } async [SymbolAsyncDispose]() { - return promisify(super.close).call(this); + return FunctionPrototypeCall(promisify(super.close), this); } }