Skip to content

Commit

Permalink
Merged pull request #39 from timmattison/master.
Browse files Browse the repository at this point in the history
Looks like this may fix the issue that I reported
  • Loading branch information
indexzero committed Apr 26, 2011
2 parents ddf31b2 + 642e158 commit ac425d7
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions lib/node-http-proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,9 @@ 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;
}
Expand Down Expand Up @@ -668,4 +666,4 @@ HttpProxy.prototype.proxyWebSocketRequest = function (req, socket, head, options
if (options.buffer && !errState) {
options.buffer.resume();
}
};
};

0 comments on commit ac425d7

Please sign in to comment.