mirror of
https://github.com/http-party/node-http-proxy.git
synced 2025-12-08 20:59:18 +00:00
[refactor] Pass all options to Agent constructor
This commit is contained in:
parent
e925e4928f
commit
eafdc744b6
@ -352,12 +352,7 @@ exports._getAgent = function _getAgent (options) {
|
||||
var Agent = options.https ? https.Agent : http.Agent,
|
||||
agent;
|
||||
|
||||
agent = new Agent({
|
||||
host: options.host,
|
||||
port: options.port
|
||||
});
|
||||
|
||||
agent.maxSockets = options.maxSockets || maxSockets;
|
||||
agent = new Agent(options);
|
||||
|
||||
return agent;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user