0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-29 23:16:30 +01:00

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

This commit is contained in:
Maciej Małecki 2012-05-27 23:29:00 +02:00 committed by Ben Noordhuis
parent 0fd2834539
commit c96df0e37a

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