Skip to content

Conversation

Gilthoniel
Copy link
Contributor

@Gilthoniel Gilthoniel commented May 15, 2024

Fixes #1218

Motivation

Calling Next on a reader already closed will block forever unless the context is canceled. Similarly, the call will not return if a different go routine closes the reader.

Modifications

Next now listens for the close channel of the consumer to return an error when it closes.

Verifying this change

  • Make sure that the change passes the CI checks.

This change added tests and can be verified as follows:

  • Added an integration test that closes the reader and calls Next

Does this pull request potentially affect one of the following parts:

None

@Gilthoniel Gilthoniel force-pushed the feature/reader-next-close branch from ae1cfc7 to 817812e Compare May 16, 2024 04:40
@RobertIndie RobertIndie merged commit a09ae32 into apache:master May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Closed reader does not return in Next
3 participants