Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
ronag committed Nov 8, 2021
1 parent 0e0d5c9 commit 3d0d042
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/internal/streams/pipeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -338,8 +338,6 @@ function pipe (src, dst) {
dst.end();
}

const state = src._readableState;

const objectMode = (
src.readableObjectMode ||
src._readableState?.objectMode ||
Expand All @@ -348,7 +346,11 @@ function pipe (src, dst) {
);

function pump () {
while (!dst.writableNeedDrain) {
if (dst.writableNeedDrain) {
return;
}

while (true) {
const chunk = src.read((!objectMode && dst.writableHighwaterMark) || undefined);
if (chunk === null || !dst.write(chunk)) {
return;
Expand Down

0 comments on commit 3d0d042

Please sign in to comment.