diff --git a/lib/node-http-proxy.js b/lib/node-http-proxy.js index c0c85a5..5d7f507 100644 --- a/lib/node-http-proxy.js +++ b/lib/node-http-proxy.js @@ -352,12 +352,7 @@ exports._getAgent = function _getAgent (options) { var Agent = options.https ? https.Agent : http.Agent, agent; - agent = new Agent({ - host: options.host, - port: options.port - }); - - agent.maxSockets = options.maxSockets || maxSockets; + agent = new Agent(options); return agent; } @@ -392,4 +387,4 @@ exports._getBase = function _getBase (options) { } return result; -}; \ No newline at end of file +};