Skip to content

Commit

Permalink
[fix] use agent pool
Browse files Browse the repository at this point in the history
  • Loading branch information
yawnt committed Aug 28, 2013
1 parent c961279 commit abf1d90
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/caronte.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion lib/caronte/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -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]; }
);

Expand Down

0 comments on commit abf1d90

Please sign in to comment.