Browse Source

stream: Remove pipeOpts.chunkSize

It's not actually necessary for backwards compatibility, isn't
used anywhere, and isn't even tested.  Better to just remove it.
v0.9.12-release
isaacs 12 years ago
parent
commit
d5a0940fff
  1. 7
      lib/_stream_readable.js
  2. 2
      test/simple/test-stream2-fs.js

7
lib/_stream_readable.js

@ -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) {
@ -420,9 +419,6 @@ Readable.prototype.pipe = function(dest, pipeOpts) {
cleanup();
}
if (pipeOpts && pipeOpts.chunkSize)
state.pipeChunkSize = pipeOpts.chunkSize;
function onend() {
dest.end();
}
@ -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);

2
test/simple/test-stream2-fs.js

@ -73,4 +73,4 @@ w.on('results', function(res) {
console.log('ok');
});
r.pipe(w, { chunkSize: 10 });
r.pipe(w);

Loading…
Cancel
Save