mirror of https://github.com/nodejs/node.git
stream: don't call `cleanup` twice on `end` and `close`
parent
0fd2834539
commit
c96df0e37a
|
@ -63,9 +63,6 @@ Stream.prototype.pipe = function(dest, options) {
|
|||
if (didOnEnd) return;
|
||||
didOnEnd = true;
|
||||
|
||||
// remove the listeners
|
||||
cleanup();
|
||||
|
||||
dest.end();
|
||||
}
|
||||
|
||||
|
@ -74,9 +71,6 @@ Stream.prototype.pipe = function(dest, options) {
|
|||
if (didOnEnd) return;
|
||||
didOnEnd = true;
|
||||
|
||||
// remove the listeners
|
||||
cleanup();
|
||||
|
||||
dest.destroy();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue