You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the implementation of finished/eos depends on internal streams API's which means that there is currently no proper way to implement "streamlike" objects that are compatible.
We've improved the situation with writableFinished but there are still a lot of internal properties that need to be accessed for proper function. Currently e.g. OutgoingMessage has some limitations in regards to this (e.g. #28748 won't work).
I think what needs to be added to the streams API is:
readableEnded
Also, I think readableEnded/writableFinished should be changed so that it becomes true after'end'/'finish' has been emitted (not like it is today where it is set before).
Also, I think readableEnded/writableFinished should be changed so that it becomes true after 'end'/'finish' has been emitted (not like it is today where it is set before).
I'm -1 to this change unless it's highly motivated. These things are always going to cause trouble.
Also, I think readableEnded/writableFinished should be changed so that it becomes true after 'end'/'finish' has been emitted (not like it is today where it is set before).
I'm -1 to this change unless it's highly motivated. These things are always going to cause trouble.
Yup, this is a horrible change that is causing trouble and means that my code will still have to rely on _readableState.ended (or some annoying workaround) to work.
FYI, I use it to avoid calling stream.destroy(err) when the stream has already already ended through stream.push(null).
Activity
[-]stream.finished depends on internal API[/-][+]stream: finished depends on internal API[/+]ronag commentedon Jul 23, 2019
@mcollina
mcollina commentedon Jul 23, 2019
+1 to
readableEnded!I'm -1 to this change unless it's highly motivated. These things are always going to cause trouble.
stream: add readableEnded
stream: add readableEnded
ronag commentedon Aug 24, 2019
This has been sorted
kanongil commentedon Sep 21, 2021
Yup, this is a horrible change that is causing trouble and means that my code will still have to rely on
_readableState.ended(or some annoying workaround) to work.FYI, I use it to avoid calling
stream.destroy(err)when thestreamhas already already ended throughstream.push(null).