Skip to content

Commit

Permalink
[refactor] Pass all options to Agent constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
mmalecki committed Sep 27, 2012
1 parent e925e49 commit eafdc74
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions lib/node-http-proxy.js
Expand Up @@ -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;
}
Expand Down Expand Up @@ -392,4 +387,4 @@ exports._getBase = function _getBase (options) {
}

return result;
};
};

0 comments on commit eafdc74

Please sign in to comment.