diff --git a/lib/node-http-proxy.js b/lib/node-http-proxy.js index 5d7f507..01f2b9d 100644 --- a/lib/node-http-proxy.js +++ b/lib/node-http-proxy.js @@ -352,6 +352,9 @@ exports._getAgent = function _getAgent (options) { var Agent = options.https ? https.Agent : http.Agent, agent; + // require('http-proxy').setMaxSockets() should override http's default + // configuration value (which is pretty low). + options.maxSockets = options.maxSockets || maxSockets; agent = new Agent(options); return agent;