Browse Source

Revert "stream: Never call decoder.end() multiple times"

This reverts commit 615d809ac6.
v0.10.1-release
isaacs 12 years ago
parent
commit
6399839c39
  1. 1
      lib/_stream_readable.js
  2. 4
      test/simple/test-stream2-set-encoding.js

1
lib/_stream_readable.js

@ -349,7 +349,6 @@ function onEofChunk(stream, state) {
state.buffer.push(chunk); state.buffer.push(chunk);
state.length += state.objectMode ? 1 : chunk.length; state.length += state.objectMode ? 1 : chunk.length;
} }
state.decoder = null;
} }
// if we've ended and we have some data left, then emit // if we've ended and we have some data left, then emit

4
test/simple/test-stream2-set-encoding.js

@ -163,10 +163,6 @@ test('setEncoding hex', function(t) {
// just kick it off. // just kick it off.
tr.emit('readable'); tr.emit('readable');
process.on('exit', function() {
assert(!tr._readableState.decoder);
});
}); });
test('setEncoding hex with read(13)', function(t) { test('setEncoding hex with read(13)', function(t) {

Loading…
Cancel
Save