Skip to content

Commit

Permalink
Merge pull request #323 from indutny/fix-maciej-issue
Browse files Browse the repository at this point in the history
lib: allow overriding maxSockets
  • Loading branch information
mmalecki committed Oct 26, 2012
2 parents 4d7e8a8 + a487dc9 commit 3d61877
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/node-http-proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 3d61877

Please sign in to comment.