Commit 642e1580 authored by timmattison's avatar timmattison

Fixed "Invalid argument to getAgent" when proxying HTTP

parent ddf31b22
......@@ -45,10 +45,8 @@ exports.version = [0, 5, 0];
// and sets the `maxSockets` property appropriately.
//
function _getAgent (host, port, secure) {
var agent = !secure ? http.getAgent(host, port) : https.getAgent({
host: host,
port: port
});
var options = { host: host, port: port };
var agent = !secure ? http.getAgent(options) : https.getAgent(options);
agent.maxSockets = maxSockets;
return agent;
......
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