Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Revert "stream: defer readable and flow when sync"
This reverts commit 563fff2
as it was causing failures in CITGM with `dicer`.

Refs: #18515
  • Loading branch information
addaleax committed Feb 7, 2018
commit 203e607201fa9567d3e38278b036645d8bd0f811
17 changes: 5 additions & 12 deletions lib/_stream_readable.js
Original file line number Diff line number Diff line change
Expand Up @@ -488,18 +488,11 @@ function onEofChunk(stream, state) {
}
state.ended = true;

if (state.sync && state.length) {
// if we are sync and have data in the buffer, wait until next tick
// to emit the data. otherwise we risk emitting data in the flow()
// the readable code triggers during a read() call
emitReadable(stream);
} else {
// emit 'readable' now to make sure it gets picked up.
state.needReadable = false;
if (!state.emittedReadable) {
state.emittedReadable = true;
emitReadable_(stream);
}
// emit 'readable' now to make sure it gets picked up.
state.needReadable = false;
if (!state.emittedReadable) {
state.emittedReadable = true;
emitReadable_(stream);
}
}

Expand Down
67 changes: 0 additions & 67 deletions test/parallel/test-stream-pipe-flow.js

This file was deleted.

40 changes: 0 additions & 40 deletions test/parallel/test-stream-readable-pause-and-resume.js

This file was deleted.