Skip to content

[AsyncStreaming] Skip empty buffers in AsyncReader.forEachBuffer#435

Merged
FranzBusch merged 1 commit into
apple:mainfrom
FranzBusch:fb-async-streaming-for-each-fix
Jun 23, 2026
Merged

[AsyncStreaming] Skip empty buffers in AsyncReader.forEachBuffer#435
FranzBusch merged 1 commit into
apple:mainfrom
FranzBusch:fb-async-streaming-for-each-fix

Conversation

@FranzBusch

@FranzBusch FranzBusch commented Jun 22, 2026

Copy link
Copy Markdown
Member

When a reader signals end-of-stream with an empty buffer, body was still invoked with that empty buffer. Skip the body call when the buffer is empty.

Fixes #432

@FranzBusch FranzBusch marked this pull request as ready for review June 22, 2026 19:10
@FranzBusch FranzBusch requested a review from Catfish-Man June 22, 2026 19:10
When a reader signals end-of-stream with an empty buffer, body was still invoked with that empty buffer. Skip the body call when the buffer is empty.
@FranzBusch FranzBusch force-pushed the fb-async-streaming-for-each-fix branch from ce38a24 to e830403 Compare June 22, 2026 20:37
@FranzBusch FranzBusch merged commit e814381 into apple:main Jun 23, 2026
31 checks passed
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.

AsyncReader.forEachBuffer calls body with an empty buffer at the end

2 participants