From 2caa5d2b0d55898c133a0bf3a0048ee969efb121 Mon Sep 17 00:00:00 2001 From: KimSchneider Date: Mon, 1 Aug 2011 13:22:30 +0300 Subject: [PATCH] The number of maxSockets has to be set after the agent is created. Setting the property in the constructor does not work. --- lib/node-http-proxy.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/node-http-proxy.js b/lib/node-http-proxy.js index 227d06f..1340cab 100644 --- a/lib/node-http-proxy.js +++ b/lib/node-http-proxy.js @@ -61,9 +61,10 @@ function _getAgent (host, port, secure) { _agents[id] = new Agent({ host: host, - port: port, - maxSockets: maxSockets + port: port }); + + _agents[id].maxSockets = maxSockets; } return _agents[id];