-
Notifications
You must be signed in to change notification settings - Fork 29.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Readable Pause event not triggered when unpipe causes the pause #32470
Labels
stream
Issues and PRs related to the stream subsystem.
Comments
|
@nodejs/streams |
I don't mind if we add a couple other events (pipe/unpipe), but I do need to know when the stream gets paused so I can deal with it on the external resource. |
ronag
added a commit
to nxtedition/node
that referenced
this issue
Mar 24, 2020
unpipe should use pause() instead of mutating state.flowing directly so that pausing side effects such as emitting 'pause' are properly performed. Fixes: nodejs#32470
casret
changed the title
Readeable Pause event not triggered when unpipe causes the pause
Readable Pause event not triggered when unpipe causes the pause
Mar 25, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What steps will reproduce the bug?
How often does it reproduce? Is there a required condition?
Every time.
What is the expected behavior?
I would expect the pause event to occur (and "pause called" to be written to the console).
What do you see instead?
Nothing
Additional information
Though the docs say that pause will be emitted when pause() is called, it also says that about the resume event, but the resume event is emitted on first pipe(), so it's inconsistent.
The text was updated successfully, but these errors were encountered: