From b722039084c796e532544a51971a985bda399d5a Mon Sep 17 00:00:00 2001 From: Pranshu Srivastava Date: Mon, 8 Jun 2020 03:36:53 +0530 Subject: [PATCH] stream: propagate end's cb to write Fixes: https://github.com/nodejs/node/issues/33684 --- lib/_stream_writable.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/_stream_writable.js b/lib/_stream_writable.js index 916e9b87d9c17a..411e36da8b0ae4 100644 --- a/lib/_stream_writable.js +++ b/lib/_stream_writable.js @@ -587,7 +587,7 @@ Writable.prototype.end = function(chunk, encoding, cb) { } if (chunk !== null && chunk !== undefined) - this.write(chunk, encoding); + this.write(chunk, encoding, cb); // .end() fully uncorks. if (state.corked) {