diff options
author | Michaël Zasso <targos@protonmail.com> | 2020-12-06 15:37:02 +0100 |
---|---|---|
committer | Beth Griggs <bgriggs@redhat.com> | 2021-02-08 17:27:27 +0000 |
commit | 017eed665b79c21c9298ea5b37c9c70e0959e359 (patch) | |
tree | 3ec70361b095a49b38573a9a9dc6932fb3a20f88 | |
parent | 20b1e6c802af6f8ef8626ffb4e459d90ec81c1b5 (diff) | |
download | node-new-017eed665b79c21c9298ea5b37c9c70e0959e359.tar.gz |
http: do not loop over prototype in Agent
Fixes: https://github.com/nodejs/node/issues/36364
PR-URL: https://github.com/nodejs/node/pull/36410
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Ricky Zhou <0x19951125@gmail.com>
-rw-r--r-- | lib/_http_agent.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/_http_agent.js b/lib/_http_agent.js index fc20260baf..aeca444ad1 100644 --- a/lib/_http_agent.js +++ b/lib/_http_agent.js @@ -435,7 +435,7 @@ Agent.prototype.removeSocket = function removeSocket(s, options) { // There might be older requests in a different origin, but // if the origin which releases the socket has pending requests // that will be prioritized. - for (const prop in this.requests) { + for (const prop of ObjectKeys(this.requests)) { // Check whether this specific origin is already at maxSockets if (this.sockets[prop] && this.sockets[prop].length) break; debug('removeSocket, have a request with different origin,' + |