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.
This commit is contained in:
isaacs 2013-03-05 22:16:46 -08:00
Родитель 8c44869f1d
Коммит d5a0940fff
2 изменённых файлов: 2 добавлений и 7 удалений

Просмотреть файл

@ -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);

Просмотреть файл

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