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

[Issue 1218][Reader] Reader Next returns on closed consumer #1219

Merged
merged 1 commit into from
May 20, 2024

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

Signed-off-by: Gaylor Bosson <gb@taurusgroup.ch>
@RobertIndie RobertIndie merged commit a09ae32 into apache:master May 20, 2024
8 checks passed
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