Skip to content

stream: when value is already in buffer don't emit the next one

Rodrigo Muino Tomonari requested to merge github/fork/rluvaton/fix-46765 into main

fix #46765 (closed)

this is probably not the best solution, I would like to know if there is a better one.

The problem happens because when getting a second value and:

if (state.writing || state.corked || state.errored || !state.constructed)

returns false, so we write the second value with stream._write, and then clearBuffer is called which emits the rest


this PR is not ready to be merged, I did not set it as draft so I would be able to run tests

Merge request reports

Loading