Commit 40dc9dee authored by indexzero's avatar indexzero

Revert "Fixed "Invalid argument to getAgent" when proxying HTTP"

This reverts commit 642e1580.
parent 57127a36
......@@ -45,9 +45,11 @@ exports.version = [0, 5, 0];
// and sets the `maxSockets` property appropriately.
//
function _getAgent (host, port, secure) {
var options = { host: host, port: port };
var agent = !secure ? http.getAgent(options) : https.getAgent(options);
var agent = !secure ? http.getAgent(host, port) : https.getAgent({
host: host,
port: port
});
agent.maxSockets = maxSockets;
return agent;
}
......@@ -666,4 +668,4 @@ HttpProxy.prototype.proxyWebSocketRequest = function (req, socket, head, options
if (options.buffer && !errState) {
options.buffer.resume();
}
};
};
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment