Skip to content

Commit

Permalink
add byteLength measurement in eEofChunk function
Browse files Browse the repository at this point in the history
  • Loading branch information
jalafel committed Oct 28, 2016
1 parent cedc393 commit 62458d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/_stream_readable.js
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ function onEofChunk(stream, state) {
var chunk = state.decoder.end();
if (chunk && chunk.length) {
state.buffer.push(chunk);
state.length += state.objectMode ? 1 : chunk.length;
state.length += state.objectMode ? 1 : Buffer.byteLength(chunk, state.encoding);
}
}
state.ended = true;
Expand Down

0 comments on commit 62458d7

Please sign in to comment.