-
-
Notifications
You must be signed in to change notification settings - Fork 33.5k
Closed
Labels
streamIssues and PRs related to the stream subsystem.Issues and PRs related to the stream subsystem.
Description
- Version: >= 10.0.0
- Platform: any
- Subsystem: stream
Consider the following example, born from discussion in #25969.
const { Readable } = require('stream');
const buf = Buffer.alloc(8192);
const readable = new Readable({
read() {
this.push(buf);
}
});
readable.on('readable', function() {
const data = readable.read();
console.log(data.length);
});
Note that readable.read()
is not called in a loop on purpose.
Expected behavior
An endless loop. This works as expected in Node.js < 10.0.0.
Actual behavior
Reading stops after a few reads.
Bisecting points to this commit: 0778f79.
Metadata
Metadata
Assignees
Labels
streamIssues and PRs related to the stream subsystem.Issues and PRs related to the stream subsystem.