mirror of https://github.com/nodejs/node.git
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.pull/24507/merge
parent
8c44869f1d
commit
d5a0940fff
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue