diff --git a/lib/_stream_readable.js b/lib/_stream_readable.js index 1131b24a2e..95d4d0effb 100644 --- a/lib/_stream_readable.js +++ b/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); diff --git a/test/simple/test-stream2-fs.js b/test/simple/test-stream2-fs.js index 70cd8ba4de..09f77b9a66 100644 --- a/test/simple/test-stream2-fs.js +++ b/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);