From 1f9a5ae7aadd073ac61933226687a4483f8eccf4 Mon Sep 17 00:00:00 2001 From: Michaƫl Zasso Date: Wed, 27 Nov 2019 19:59:29 +0100 Subject: lib: use static Number properties from primordials PR-URL: https://github.com/nodejs/node/pull/30686 Reviewed-By: Trivikram Kamat Reviewed-By: Anna Henningsen --- lib/_http_client.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/_http_client.js') diff --git a/lib/_http_client.js b/lib/_http_client.js index 249a6d6028..6d8cb8fc8e 100644 --- a/lib/_http_client.js +++ b/lib/_http_client.js @@ -24,6 +24,7 @@ const { ArrayIsArray, Boolean, + NumberIsFinite, ObjectAssign, ObjectKeys, ObjectSetPrototypeOf, @@ -210,7 +211,7 @@ function ClientRequest(input, options, cb) { // but only if the Agent will actually reuse the connection! // If it's not a keepAlive agent, and the maxSockets==Infinity, then // there's never a case where this socket will actually be reused - if (!this.agent.keepAlive && !Number.isFinite(this.agent.maxSockets)) { + if (!this.agent.keepAlive && !NumberIsFinite(this.agent.maxSockets)) { this._last = true; this.shouldKeepAlive = false; } else { -- cgit v1.2.3