Skip to content

Commit 017eed6

Browse files
targosBethGriggs
authored andcommitted
http: do not loop over prototype in Agent
Fixes: #36364 PR-URL: #36410 Reviewed-By: Gerhard Stöbich <[email protected]> Reviewed-By: Ricky Zhou <[email protected]>
1 parent 20b1e6c commit 017eed6

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)