Skip to content

Commit 2caa5d2

Browse files
author
KimSchneider
committed
The number of maxSockets has to be set after the agent is created. Setting the property in the constructor does not work.
1 parent 25c06a3 commit 2caa5d2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/node-http-proxy.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,10 @@ function _getAgent (host, port, secure) {
6161

6262
_agents[id] = new Agent({
6363
host: host,
64-
port: port,
65-
maxSockets: maxSockets
64+
port: port
6665
});
66+
67+
_agents[id].maxSockets = maxSockets;
6768
}
6869

6970
return _agents[id];

0 commit comments

Comments
 (0)