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
{{ message }}
Repository navigation
stream.resume() doesn't make the stream flowing after removing readable listener #24281
Platform: Darwin planata.local 17.7.0 Darwin Kernel Version 17.7.0: Wed Oct 10 23:06:14 PDT 2018; root:xnu-4570.71.13~1/RELEASE_X86_64 x86_64 i386 MacBookPro14,2 Darwin
Subsystem: stream
With v10.13.0, stream.resume() doesn't make the stream flowing after removing readable listener. Here is a code to demonstrate the problem.
Note that you need to name this script s.js to run this script without any changes.
With v10.13.0, this prints nothing. With v8.12.0, this prints end. This seems to be related to #18994, #21696 and #22209, but I'm not sure if this is an intentional change.
Note that a stream starts flowing when I add data listener instead of calling resume.
Activity
targos commentedon Nov 10, 2018
@nodejs/streams
shobhitchittora commentedon Nov 12, 2018
Hey @snakamura! As per the docs -
So if you remove your
readablelistener, you getendprinted. Does that help!snakamura commentedon Nov 12, 2018
@shobhitchittora That's what I expected, and v10.13.0 didn't work like that as you can see in my code.
mcollina commentedon Nov 14, 2018
Confirmed, we need to have a look in more detail.
stream: correctly pause and resume after once('readable')
mcollina commentedon Nov 14, 2018
Check out #24366.
mcollina commentedon Nov 21, 2018
Fixed in 69cc58d.
stream: correctly pause and resume after once('readable')
stream: correctly pause and resume after once('readable')
snakamura commentedon Nov 22, 2018
Thank you!
stream: correctly pause and resume after once('readable')
snakamura commentedon Dec 26, 2018
@nodejs/backporters Sorry to bother you, but are there chances that this fix will be backported to 10.x LTS?
stream: correctly pause and resume after once('readable')
stream: correctly pause and resume after once('readable')
stream: correctly pause and resume after once('readable')