Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit cd9a810

Browse filesBrowse files
targosruyadorno
authored andcommitted
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 e8a4e56 commit cd9a810
Copy full SHA for cd9a810

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Open diff view settings
Collapse file

‎lib/_http_agent.js‎

Copy file name to clipboardExpand all lines: lib/_http_agent.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ Agent.prototype.removeSocket = function removeSocket(s, options) {
428428
// There might be older requests in a different origin, but
429429
// if the origin which releases the socket has pending requests
430430
// that will be prioritized.
431-
for (const prop in this.requests) {
431+
for (const prop of ObjectKeys(this.requests)) {
432432
// Check whether this specific origin is already at maxSockets
433433
if (this.sockets[prop] && this.sockets[prop].length) break;
434434
debug('removeSocket, have a request with different origin,' +

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.