mirror of
https://github.com/http-party/node-http-proxy.git
synced 2025-12-08 20:59:18 +00:00
lib: allow overriding maxSockets
This commit is contained in:
parent
4d7e8a808d
commit
a487dc9b58
@ -352,6 +352,9 @@ exports._getAgent = function _getAgent (options) {
|
|||||||
var Agent = options.https ? https.Agent : http.Agent,
|
var Agent = options.https ? https.Agent : http.Agent,
|
||||||
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);
|
agent = new Agent(options);
|
||||||
|
|
||||||
return agent;
|
return agent;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user