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 017eed6

Browse filesBrowse files
targosBethGriggs
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 20b1e6c commit 017eed6
Copy full SHA for 017eed6

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
@@ -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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.