-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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.finished throws ERR_STREAM_PREMATURE_CLOSE when it shouldn't #45281
Closed
Tracked by
#144012
Labels
stream
Issues and PRs related to the stream subsystem.
Comments
3 tasks
cc: @ronag |
ronag
added a commit
to nxtedition/node
that referenced
this issue
Nov 3, 2022
marco-ippolito
pushed a commit
to marco-ippolito/node
that referenced
this issue
Nov 23, 2022
Fixes: nodejs#45281 PR-URL: nodejs#45301 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version
17.x, 18.x, 19.x
Platform
Darwin watson.localdomain 21.6.0 Darwin Kernel Version 21.6.0: Thu Sep 29 20:13:56 PDT 2022; root:xnu-8020.240.7~1/RELEASE_ARM64_T6000 arm64
Subsystem
stream
What steps will reproduce the bug?
On Node.js 17 and newer, the program below will call the
finished
callback with anERR_STREAM_PREMATURE_CLOSE
error.How often does it reproduce? Is there a required condition?
Always
What is the expected behavior?
I'm not sure. For me it's unexpected and I'm not sure how to use
finished
in a scenario like this without getting this error.What do you see instead?
I would expect the
finished
callback to be called without an error.Additional information
As mentioned above, I'm not 100% if this is a bug or not. If it's not a bug, then the behaviour is at least unexpected and
finished
probably needs better documentation.The text was updated successfully, but these errors were encountered: