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

Avoid recorder for io.ReadSeeker in anyio.NewReaderWithOpts #4790

Merged
merged 1 commit into from
Oct 2, 2023

Conversation

nwt
Copy link
Member

@nwt nwt commented Sep 29, 2023

NewReaderWithOpts always creates a Recorder, which buffers its input and can cause format detection to fail if the buffer is too small. Avoid that problem when the passed reader implements io.ReadSeeker by modifying Track to create a Recorder only when the reader cannot seek.

Closes #4586.

NewReaderWithOpts always creates a Recorder, which buffers its input and
can cause format detection to fail if the buffer is too small.  Avoid
that problem when the passed reader implements io.ReadSeeker by
modifying Track to create a Recorder only when the reader cannot seek.

Closes #4586.
@nwt nwt requested a review from a team September 29, 2023 21:24
@nwt nwt merged commit 7cde67c into main Oct 2, 2023
3 checks passed
@nwt nwt deleted the avoid-recorder branch October 2, 2023 14:31
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.

Auto-detect failure on ZNG input: buffer exceeded max size
2 participants