From eafdc744b67b33b5ed3cfc80de84dafcd850bdd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Ma=C5=82ecki?= Date: Thu, 27 Sep 2012 07:49:53 +0200 Subject: [PATCH] [refactor] Pass all options to `Agent` constructor --- lib/node-http-proxy.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) 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 +};