Skip to content

Commit 9852ebc

Browse files
committed
http: do not loop over prototype in Agent
Fixes: #36364 PR-URL: #36410 Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Ricky Zhou <0x19951125@gmail.com>
1 parent 86595cd commit 9852ebc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/_http_agent.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ Agent.prototype.removeSocket = function removeSocket(s, options) {
435435
// There might be older requests in a different origin, but
436436
// if the origin which releases the socket has pending requests
437437
// that will be prioritized.
438-
for (const prop in this.requests) {
438+
for (const prop of ObjectKeys(this.requests)) {
439439
// Check whether this specific origin is already at maxSockets
440440
if (this.sockets[prop] && this.sockets[prop].length) break;
441441
debug('removeSocket, have a request with different origin,' +

0 commit comments

Comments
 (0)