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

Allow maxBuffer option to be set to Buffer MAX_LENGTH #40

Merged
merged 2 commits into from
Aug 9, 2020

Conversation

gpoole
Copy link
Contributor

@gpoole gpoole commented Aug 9, 2020

This change allows passing Buffer's MAX_LENGTH constant as the maxBuffer option (or values larger than MAX_LENGTH). Fixes a bug where other errors would be hidden by a RangeError (e.g. "RangeError: "size" argument must not be larger than 2147483647") when the error handling code tried to call getBufferedValue while buffering a stream larger than Buffer's MAX_LENGTH.

@sindresorhus sindresorhus changed the title Allow maxBuffer to be set to Buffer MAX_LENGTH Allow maxBuffer option to be set to Buffer MAX_LENGTH Aug 9, 2020
@sindresorhus sindresorhus merged commit 127d83c into sindresorhus:master Aug 9, 2020
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

Successfully merging this pull request may close these issues.

2 participants