From 37d9231eeff5b1ca004ce77ca04a2292783ba588 Mon Sep 17 00:00:00 2001 From: dodo Date: Wed, 21 Sep 2011 04:31:35 +0200 Subject: [PATCH] another feature request in issue #4 unvealed a bug with flushing on end in paused state --- src/buffer-stream.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/buffer-stream.coffee b/src/buffer-stream.coffee index 064c541..ab71cf7 100644 --- a/src/buffer-stream.coffee +++ b/src/buffer-stream.coffee @@ -64,7 +64,7 @@ class BufferStream extends Stream @emit('drain') if @paused @paused = off @emit('resume') if @size is 'none' - @flush() if not @enabled or @size is 'none' + @flush() if not @enabled or @finished if @finished @emit('end') @emit('close')