mirror of
https://github.com/nodejs/node.git
synced 2024-11-30 07:27:22 +01:00
Fix #3179 HTTP memory leak using ClientRequest.
This commit is contained in:
parent
c9be1d5ffd
commit
75f2365558
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user