From 75f23655581d6f0ac28bfaa864c1a578b94ffcd7 Mon Sep 17 00:00:00 2001 From: vvo Date: Fri, 27 Apr 2012 01:02:10 +0200 Subject: [PATCH] Fix #3179 HTTP memory leak using ClientRequest. --- lib/http.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/http.js b/lib/http.js index 3d3fdd48c5..96f5b6a88a 100644 --- a/lib/http.js +++ b/lib/http.js @@ -1014,7 +1014,7 @@ function ClientRequest(options, cb) { var method = self.method = (options.method || 'GET').toUpperCase(); self.path = options.path || '/'; if (cb) { - self.on('response', cb); + self.once('response', cb); } if (!Array.isArray(options.headers)) {