Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

tadjik1
Copy link
Contributor

@tadjik1 tadjik1 commented Mar 2, 2020

Hey there,
as far as I understand this PR breaks behaviour when zlib streams emit close event in case of successful end.

Since emitting close is the part of Readable.destroy implementation - .destroy must be called on ZlibBase instance. In this case (case of successful finish) this.on('end') should be sufficient.

Fixes: #32023

\cc @addaleax

Call the close method after readable 'end' so that 'close' will be
emitted afterwards.

Fixes: nodejs#32023
@nodejs-github-bot nodejs-github-bot added the zlib Issues and PRs related to the zlib subsystem. label Mar 2, 2020
Copy link
Member

@addaleax addaleax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@nodejs-github-bot
Copy link
Collaborator

@tadjik1
Copy link
Contributor Author

tadjik1 commented Mar 2, 2020

@addaleax thanks for such a quick response!
I have a question regarding failing CI: one test fails on MacOS Catalina test/sequential/test-timers-blocking-callback.js but it doesn't seem relevant to my changes, more like a flaky test.
Can we re-trigger this jenkins build to make sure that problem is somewhere in these changes?

@addaleax
Copy link
Member

addaleax commented Mar 2, 2020

Can we re-trigger this jenkins build to make sure that problem is somewhere in these changes?

Sure, done!

@nodejs-github-bot
Copy link
Collaborator

Copy link
Member

@aks- aks- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<3

@BridgeAR BridgeAR added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Mar 9, 2020
@addaleax
Copy link
Member

Landed in 0c545f0

@addaleax addaleax closed this Mar 11, 2020
addaleax pushed a commit that referenced this pull request Mar 11, 2020
Call the close method after readable 'end' so that 'close' will be
emitted afterwards.

Fixes: #32023

PR-URL: #32050
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
MylesBorins pushed a commit that referenced this pull request Mar 11, 2020
Call the close method after readable 'end' so that 'close' will be
emitted afterwards.

Fixes: #32023

PR-URL: #32050
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
@MylesBorins
Copy link
Contributor

MylesBorins commented Mar 11, 2020

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

MylesBorins pushed a commit to MylesBorins/node that referenced this pull request Mar 11, 2020
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 <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
ronag pushed a commit to nxtedition/node that referenced this pull request Mar 11, 2020
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 <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. zlib Issues and PRs related to the zlib subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

.on('close') for a readable stream stops working when going from node 12.14.0 to 12.16.1
8 participants