-
Notifications
You must be signed in to change notification settings - Fork 39
Open
Description
When pausing the "line" events after each line (and resuming asynchronously), the "end" event is fired while still processing the last line; After resuming, "end" is emitted a second time.
I made a quick look into LineByLineReader.prototype._nextLine and modified the sequence for me. It works for my case, but can't tell whether all are covered:
- comment out the if (this._end) block at line 91+
- modify check for empty _lines at 100 to read:
if (this._lines.length === 0) {
if (this._end) {
this.emit('end');
} else {
this._readStream.resume();
}
return;
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels