From 636bcdf66106da2228f67fa36f9466cb61b05821 Mon Sep 17 00:00:00 2001 From: Vlad Tasic Date: Thu, 2 Jul 2020 01:35:17 +0100 Subject: [PATCH] Fix 'Call Stack Size Exceeded' in request.js https://github.com/nodejs/node/pull/28685 https://github.com/yarnpkg/yarn/issues/7542 --- request.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/request.js b/request.js index 198b76093..976a13209 100644 --- a/request.js +++ b/request.js @@ -989,7 +989,7 @@ Request.prototype.onRequestResponse = function (response) { // Be a good stream and emit end when the response is finished. // Hack to emit end on close because of a core bug that never fires end response.on('close', function () { - if (!self._ended) { + if (!self.req._ended) { self.response.emit('end') } })