Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
stream: Remove pipeOpts.chunkSize
Browse files Browse the repository at this point in the history
It's not actually necessary for backwards compatibility, isn't
used anywhere, and isn't even tested.  Better to just remove it.
  • Loading branch information
isaacs committed Mar 6, 2013
1 parent 8c44869 commit d5a0940
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
7 changes: 1 addition & 6 deletions lib/_stream_readable.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ function ReadableState(options, stream) {

// the number of writers that are awaiting a drain event in .pipe()s
this.awaitDrain = 0;
this.pipeChunkSize = null;

this.decoder = null;
if (options.encoding) {
Expand Down Expand Up @@ -420,9 +419,6 @@ Readable.prototype.pipe = function(dest, pipeOpts) {
cleanup();
}

if (pipeOpts && pipeOpts.chunkSize)
state.pipeChunkSize = pipeOpts.chunkSize;

function onend() {
dest.end();
}
Expand Down Expand Up @@ -520,8 +516,7 @@ function flow(src) {
}
}

while (state.pipesCount &&
null !== (chunk = src.read(state.pipeChunkSize))) {
while (state.pipesCount && null !== (chunk = src.read())) {

if (state.pipesCount === 1)
write(state.pipes, 0, null);
Expand Down
2 changes: 1 addition & 1 deletion test/simple/test-stream2-fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,4 @@ w.on('results', function(res) {
console.log('ok');
});

r.pipe(w, { chunkSize: 10 });
r.pipe(w);

0 comments on commit d5a0940

Please sign in to comment.