summaryrefslogtreecommitdiff
path: root/lib/_stream_readable.js
diff options
context:
space:
mode:
author陈刚 <chengang07@meituan.com>2018-01-20 11:06:26 +0800
committerMatteo Collina <hello@matteocollina.com>2018-02-05 12:11:40 +0100
commita52b7a2794a47b9c19968d729856fdaa1597c0eb (patch)
treecbc76bd452df59c92bf67eaf54cd166fc6ab6f93 /lib/_stream_readable.js
parent83c93158fb0e979dbffb4a776d237da0db8f7b08 (diff)
downloadandroid-node-v8-a52b7a2794a47b9c19968d729856fdaa1597c0eb.tar.gz
android-node-v8-a52b7a2794a47b9c19968d729856fdaa1597c0eb.tar.bz2
android-node-v8-a52b7a2794a47b9c19968d729856fdaa1597c0eb.zip
stream: cleanup() when unpiping all streams.
This PR makes sure the object emitted as the 'unpipe' event in the destination stream is not shared between destination, as it would be muted. Refs: https://github.com/nodejs/node/pull/12746 PR-URL: https://github.com/nodejs/node/pull/18266 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'lib/_stream_readable.js')
-rw-r--r--lib/_stream_readable.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/_stream_readable.js b/lib/_stream_readable.js
index 19e9e7a743..dc2c587aed 100644
--- a/lib/_stream_readable.js
+++ b/lib/_stream_readable.js
@@ -751,7 +751,7 @@ Readable.prototype.unpipe = function(dest) {
state.flowing = false;
for (var i = 0; i < len; i++)
- dests[i].emit('unpipe', this, unpipeInfo);
+ dests[i].emit('unpipe', this, { hasUnpiped: false });
return this;
}