[fix] use agent pool

This commit is contained in:
yawnt 2013-08-28 15:22:04 +02:00
parent c9612798f1
commit abf1d90fdf
2 changed files with 2 additions and 2 deletions

View File

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

View File

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