Fix #3179 HTTP memory leak using ClientRequest.

This commit is contained in:
vvo 2012-04-27 01:02:10 +02:00 committed by isaacs
parent 2f93eb6102
commit 5eac8d6739

View File

@ -1126,7 +1126,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)) {