Browse Source

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

v0.9.1-release
Maciej Małecki 13 years ago
committed by Ben Noordhuis
parent
commit
c96df0e37a
  1. 6
      lib/stream.js

6
lib/stream.js

@ -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…
Cancel
Save