Fix #3179 HTTP memory leak using ClientRequest.
This commit is contained in:
parent
2f93eb6102
commit
5eac8d6739
@ -1126,7 +1126,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