-
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
stream: How to destroy and stop Readable? #29856
Labels
stream
Issues and PRs related to the stream subsystem.
Comments
@jasnell maybe? |
This was referenced Mar 11, 2021
This was referenced Apr 26, 2021
This was referenced Nov 4, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I ran into this today:
This will crash with
destroyed!
sinceread()
will emit already buffered'data'
even though the stream is destroyed.I can fix my above example by replacing
r.destroy()
with:I find this a bit unfortunate.
Questions:
Readable
that makes it possible to fully destroy and silence a readable?In order to fix this in readable we would have to check for
destroyed
and return early insideReadable.read()
.The text was updated successfully, but these errors were encountered: