-
Notifications
You must be signed in to change notification settings - Fork 30k
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
zlib: emits 'close' event after readble 'end' #32050
Conversation
Call the close method after readable 'end' so that 'close' will be emitted afterwards. Fixes: nodejs#32023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
@addaleax thanks for such a quick response! |
Sure, done! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<3
Landed in 0c545f0 |
Call the close method after readable 'end' so that 'close' will be emitted afterwards. Fixes: #32023 PR-URL: #32050 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
Call the close method after readable 'end' so that 'close' will be emitted afterwards. Fixes: #32023 PR-URL: #32050 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
This had landed on 13.x and was backed out as it seemed to break CI might be best to land as a backport PR |
Call the close method after readable 'end' so that 'close' will be emitted afterwards. Fixes: nodejs#32023 PR-URL: nodejs#32050 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
Call the close method after readable 'end' so that 'close' will be emitted afterwards. Fixes: nodejs#32023 PR-URL: nodejs#32050 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
Hey there,
as far as I understand this PR breaks behaviour when
zlib
streams emitclose
event in case of successful end.Since emitting
close
is the part ofReadable.destroy
implementation -.destroy
must be called onZlibBase
instance. In this case (case of successful finish)this.on('end')
should be sufficient.make -j4 test
(UNIX)Fixes: #32023
\cc @addaleax