-
-
Notifications
You must be signed in to change notification settings - Fork 31.6k
Stream not destroyed when piped in Duplex.from() writable #55077
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Labels
Comments
Related issue: #55010 |
I don't understand what the problem is. |
Calling |
Sounds like a bug. |
@matthieusieben would you like to send a PR to fix it? |
I gave it a try but I struggle a bit. |
Is this also a problem if you do: Duplex.from(async function (asyncGenerator) {
for await (const _ of asyncGenerator) { return }
}), instead of: Duplex.from(async function (asyncGenerator) {
asyncGenerator.return()
}), |
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Labels
Version
v22.9.0
Platform
Subsystem
stream
What steps will reproduce the bug?
How often does it reproduce? Is there a required condition?
Any code used as
Duplex.from(async function () {})
that does not fully consume the input will prevent the input stream to be properly disposed:What is the expected behavior? Why is that the expected behavior?
The readable's destroy steps should be called.
What do you see instead?
The readable is not destroyed.
Additional information
No response
The text was updated successfully, but these errors were encountered: