Skip to content

Commit ac425d7

Browse files
committed
Merged pull request #39 from timmattison/master.
Looks like this may fix the issue that I reported
2 parents ddf31b2 + 642e158 commit ac425d7

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

lib/node-http-proxy.js

+4-6
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,9 @@ exports.version = [0, 5, 0];
4545
// and sets the `maxSockets` property appropriately.
4646
//
4747
function _getAgent (host, port, secure) {
48-
var agent = !secure ? http.getAgent(host, port) : https.getAgent({
49-
host: host,
50-
port: port
51-
});
52-
48+
var options = { host: host, port: port };
49+
var agent = !secure ? http.getAgent(options) : https.getAgent(options);
50+
5351
agent.maxSockets = maxSockets;
5452
return agent;
5553
}
@@ -668,4 +666,4 @@ HttpProxy.prototype.proxyWebSocketRequest = function (req, socket, head, options
668666
if (options.buffer && !errState) {
669667
options.buffer.resume();
670668
}
671-
};
669+
};

0 commit comments

Comments
 (0)