Skip to content

Commit 3d61877

Browse files
committed
Merge pull request #323 from indutny/fix-maciej-issue
lib: allow overriding maxSockets
2 parents 4d7e8a8 + a487dc9 commit 3d61877

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Diff for: lib/node-http-proxy.js

+3
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,9 @@ exports._getAgent = function _getAgent (options) {
352352
var Agent = options.https ? https.Agent : http.Agent,
353353
agent;
354354

355+
// require('http-proxy').setMaxSockets() should override http's default
356+
// configuration value (which is pretty low).
357+
options.maxSockets = options.maxSockets || maxSockets;
355358
agent = new Agent(options);
356359

357360
return agent;

0 commit comments

Comments
 (0)