| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
- Ensure automatic destruction only happens after both 'end' and 'finish' has been emitted through autoDestroy. - Ensure close() callback is always invoked. - Ensure 'error' is only emitted once.
| } | ||
|
|
||
| Transform.call(this, { autoDestroy: false, ...opts }); | ||
| this._hadError = false; |
There was a problem hiding this comment.
We could keep _hadError for compat if necessary.
Sorry, something went wrong.
|
@nodejs/zlib |
Sorry, something went wrong.
|
It would be good to get another review. I would like to get this into the next v13.x release, if this is ready. |
Sorry, something went wrong.
Sorry, something went wrong.
There was a problem hiding this comment.
lgtm
Sorry, something went wrong.
Sorry, something went wrong.
- Ensure automatic destruction only happens after both 'end' and 'finish' has been emitted through autoDestroy. - Ensure close() callback is always invoked. - Ensure 'error' is only emitted once. PR-URL: #32220 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
|
Hey @ronag, this doesn't land cleanly on v13.x, should it be backported? |
Sorry, something went wrong.
- Ensure automatic destruction only happens after both 'end' and 'finish' has been emitted through autoDestroy. - Ensure close() callback is always invoked. - Ensure 'error' is only emitted once. PR-URL: nodejs#32220 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Backport-PR-URL: nodejs#32371
|
It appears that as a result of this PR, close passes ERR_STREAM_PREMATURE_CLOSE to its callback when closed before 'end'. For example: const { Inflate } = require('zlib');
new Inflate().close(console.error);Prints nothing in 543c046 and ERR_STREAM_PREMATURE_CLOSE in a940143 (and current master, 668bc11). I don't know whether this is expected behavior and/or whether the docs should be clearer (either about when to call close or what errors to expect), but thought it was worth mentioning to be sure you are aware of the change. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
'end' and 'finish' has been emitted through autoDestroy.
Checklist