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

maxBuffer doesn't stop buffering data when reached #42

Closed
yocontra opened this issue Dec 15, 2020 · 1 comment
Closed

maxBuffer doesn't stop buffering data when reached #42

yocontra opened this issue Dec 15, 2020 · 1 comment

Comments

@yocontra
Copy link
Contributor

Based on the docs it seems like maxBuffer would stop buffering data / end the stream once it hits the limit - currently it just rejects the promise but continues buffering data forever.

Two things that should be done:

kodiakhq bot pushed a commit to vercel/next.js that referenced this issue Dec 8, 2021
natew pushed a commit to natew/next.js that referenced this issue Feb 16, 2022
@ehmicky
Copy link
Collaborator

ehmicky commented Aug 7, 2023

The latest version fixed this issue. The stream is now read in a for await loop. When the maxBuffer is hit, this iteration stops, which means the stream is not read nor listened to anymore. The chunks variable what's been previously read, but this gets garbage collected once the function ends since it is a local variable.

Based on this, I believe this can be closed?

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

No branches or pull requests

3 participants