lib: allow overriding maxSockets

This commit is contained in:
Fedor Indutny 2012-10-26 01:39:13 +04:00
parent 4d7e8a808d
commit a487dc9b58

View File

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