From 6d8b43c366fde9af4b6d5c9e37d15cc854aa0a69 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Sun, 3 Jul 2011 11:05:03 -0700 Subject: [PATCH] http: Fix agent id creation Unbreaks test-regress-GH-877.js --- lib/http.js | 2 +- test/simple/test-regress-GH-877.js | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/http.js b/lib/http.js index 0d48dbcb5b0..ce8193f9053 100644 --- a/lib/http.js +++ b/lib/http.js @@ -1437,7 +1437,7 @@ function getAgent(options) { if (options.port || options.host) { host = options.host || 'localhost'; port = options.port || 80; - id = host + port; + id = host + ':' + port; _opts.host = host; _opts.port = port; } else if (options.socketPath) { diff --git a/test/simple/test-regress-GH-877.js b/test/simple/test-regress-GH-877.js index 6aa5d59b327..63af368caa2 100644 --- a/test/simple/test-regress-GH-877.js +++ b/test/simple/test-regress-GH-877.js @@ -6,8 +6,6 @@ var N = 20; var responses = 0; var maxQueued = 0; -debugger; - var agent = http.getAgent('127.0.0.1', common.PORT); agent.maxSockets = 10; @@ -23,8 +21,6 @@ server.listen(common.PORT, "127.0.0.1", function() { port: common.PORT, }; - debugger; - var req = http.get(options, function(res) { if (++responses == N) { server.close();