stream: don't call `cleanup` twice on `end` and `close`

pull/24503/head
Maciej Małecki 2012-05-27 23:29:00 +02:00 committed by Ben Noordhuis
parent 0fd2834539
commit c96df0e37a
1 changed files with 0 additions and 6 deletions

View File

@ -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();
}