Skip to content

Commit

Permalink
Fix 'Call Stack Size Exceeded' in request.js
Browse files Browse the repository at this point in the history
  • Loading branch information
vladat committed Jul 2, 2020
1 parent 3c0cddc commit 636bcdf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion request.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
}
})
Expand Down

0 comments on commit 636bcdf

Please sign in to comment.