Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
http: do not loop over prototype in Agent
Fixes: #36364
  • Loading branch information
targos committed Dec 6, 2020
commit 20e3cedfe48f326fc832b13b404aacd138da3ce2
2 changes: 1 addition & 1 deletion lib/_http_agent.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,' +
Expand Down