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

fix(pubsublite): close api clients when publisher clients have terminated #6867

Merged
merged 3 commits into from
Oct 17, 2022

Conversation

tmdiep
Copy link
Contributor

@tmdiep tmdiep commented Oct 14, 2022

Refactors the closing of API clients, such that it is done automatically if the PublisherClient permanently fails due to error.

compositeService is now passed a closeable, which is closed when the serviceTerminated state is reached. Users don't necessarily need to call PublisherClient.Stop if it has permanently failed in order to close the API clients, though it is good practice to always call Stop when a publisher is not longer used.

…ated

Refactors the closing of api clients, such that it is done automatically if the PublisherClient permanently fails due to error.
@tmdiep tmdiep requested review from a team and shollyman as code owners October 14, 2022 07:14
@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: pubsublite Issues related to the Pub/Sub Lite API. labels Oct 14, 2022
@tmdiep tmdiep added the automerge Merge the pull request once unit tests and other checks pass. label Oct 17, 2022
@gcf-merge-on-green gcf-merge-on-green bot merged commit 5cb5662 into googleapis:main Oct 17, 2022
@gcf-merge-on-green gcf-merge-on-green bot removed the automerge Merge the pull request once unit tests and other checks pass. label Oct 17, 2022
@tmdiep tmdiep deleted the publisher_close branch October 18, 2022 03:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: pubsublite Issues related to the Pub/Sub Lite API. size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants