From c96df0e37aed536867a41e8b6d3f0f523c37dfea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Ma=C5=82ecki?= Date: Sun, 27 May 2012 23:29:00 +0200 Subject: [PATCH] stream: don't call `cleanup` twice on `end` and `close` --- lib/stream.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lib/stream.js b/lib/stream.js index d6da2525f9..600416396f 100644 --- a/lib/stream.js +++ b/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(); }