http: Fix agent id creation
Unbreaks test-regress-GH-877.js
This commit is contained in:
parent
44d30f2d65
commit
6d8b43c366
@ -1437,7 +1437,7 @@ function getAgent(options) {
|
|||||||
if (options.port || options.host) {
|
if (options.port || options.host) {
|
||||||
host = options.host || 'localhost';
|
host = options.host || 'localhost';
|
||||||
port = options.port || 80;
|
port = options.port || 80;
|
||||||
id = host + port;
|
id = host + ':' + port;
|
||||||
_opts.host = host;
|
_opts.host = host;
|
||||||
_opts.port = port;
|
_opts.port = port;
|
||||||
} else if (options.socketPath) {
|
} else if (options.socketPath) {
|
||||||
|
@ -6,8 +6,6 @@ var N = 20;
|
|||||||
var responses = 0;
|
var responses = 0;
|
||||||
var maxQueued = 0;
|
var maxQueued = 0;
|
||||||
|
|
||||||
debugger;
|
|
||||||
|
|
||||||
var agent = http.getAgent('127.0.0.1', common.PORT);
|
var agent = http.getAgent('127.0.0.1', common.PORT);
|
||||||
agent.maxSockets = 10;
|
agent.maxSockets = 10;
|
||||||
|
|
||||||
@ -23,8 +21,6 @@ server.listen(common.PORT, "127.0.0.1", function() {
|
|||||||
port: common.PORT,
|
port: common.PORT,
|
||||||
};
|
};
|
||||||
|
|
||||||
debugger;
|
|
||||||
|
|
||||||
var req = http.get(options, function(res) {
|
var req = http.get(options, function(res) {
|
||||||
if (++responses == N) {
|
if (++responses == N) {
|
||||||
server.close();
|
server.close();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user