Skip to content

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

Merged
nwt merged 1 commit intomainfrom
avoid-recorder
Oct 2, 2023
Merged

Avoid recorder for io.ReadSeeker in anyio.NewReaderWithOpts#4790
nwt merged 1 commit intomainfrom
avoid-recorder

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
@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