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