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();
|
var method = self.method = (options.method || 'GET').toUpperCase();
|
||||||
self.path = options.path || '/';
|
self.path = options.path || '/';
|
||||||
if (cb) {
|
if (cb) {
|
||||||
self.on('response', cb);
|
self.once('response', cb);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Array.isArray(options.headers)) {
|
if (!Array.isArray(options.headers)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user