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

Crash caused by missing backpressure support #121

Open
maxoumime opened this issue Oct 26, 2022 · 0 comments
Open

Crash caused by missing backpressure support #121

maxoumime opened this issue Oct 26, 2022 · 0 comments

Comments

@maxoumime
Copy link

Hi 👋

Thank you for creating this nice tool 👌

Problem

I'm experiencing crashes and Out of memory issues when using archiver.
After investigating, I've discovered that those crashes happen during the finish phase, and it's because backpressure isn't respected when writing entries to the central file header.

Solution

The solution is to catch what stream.write returns, so we know if we're allowed to keep writing. It's easy to fix but it makes the finish function asynchronous, and you'd need to update the upper libraries (zip-stream and archiver) to support it.

What do you think? Is this on your radar? Do you plan on fixing it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant