diff --git a/lib/caronte.js b/lib/caronte.js index 81a25e4..3ccd251 100644 --- a/lib/caronte.js +++ b/lib/caronte.js @@ -45,7 +45,7 @@ proxy.createProxyServer = function createProxyServer(options) { options[key] = url.parse(options[key]); options[key].maxSockets = options.maxSock; - options[key].agent = new (options.ssl ? https.Agent : http.Agent)(options[key]); + options[key].agent = new (options.ssl ? https.Agent : http.Agent)(options[key].maxSockets || 100); }); return { diff --git a/lib/caronte/common.js b/lib/caronte/common.js index 78b4586..68f4a92 100644 --- a/lib/caronte/common.js +++ b/lib/caronte/common.js @@ -21,7 +21,7 @@ var common = exports; */ common.setupOutgoing = function(outgoing, options, req, forward) { - ['host', 'hostname', 'port', 'socketPath'/*, 'agent'*/].forEach( + ['host', 'hostname', 'port', 'socketPath', 'agent'].forEach( function(e) { outgoing[e] = options[forward || 'target'][e]; } );