From 6399839c398056756c0d668557339b99a54500e8 Mon Sep 17 00:00:00 2001 From: isaacs Date: Wed, 13 Mar 2013 15:48:56 -0700 Subject: [PATCH] Revert "stream: Never call decoder.end() multiple times" This reverts commit 615d809ac684a7d2cc7ee5e1aa58f0a921b529a0. --- lib/_stream_readable.js | 1 - test/simple/test-stream2-set-encoding.js | 4 ---- 2 files changed, 5 deletions(-) diff --git a/lib/_stream_readable.js b/lib/_stream_readable.js index c669455d7d..b09694c071 100644 --- a/lib/_stream_readable.js +++ b/lib/_stream_readable.js @@ -349,7 +349,6 @@ function onEofChunk(stream, state) { state.buffer.push(chunk); state.length += state.objectMode ? 1 : chunk.length; } - state.decoder = null; } // if we've ended and we have some data left, then emit diff --git a/test/simple/test-stream2-set-encoding.js b/test/simple/test-stream2-set-encoding.js index ad4d884680..8c5973fb63 100644 --- a/test/simple/test-stream2-set-encoding.js +++ b/test/simple/test-stream2-set-encoding.js @@ -163,10 +163,6 @@ test('setEncoding hex', function(t) { // just kick it off. tr.emit('readable'); - - process.on('exit', function() { - assert(!tr._readableState.decoder); - }); }); test('setEncoding hex with read(13)', function(t) {