[refactor] Pass all options to Agent constructor

This commit is contained in:
Maciej Małecki 2012-09-27 07:49:53 +02:00
parent e925e4928f
commit eafdc744b6

View File

@ -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;
};
};