Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Bidi BackgroundConsumer not Properly Notifying Caller on Fatal Processing Exceptions #820

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

Closed
abbrowne126 opened this issue May 23, 2025 · 0 comments · Fixed by #821
Closed
Assignees

Comments

@abbrowne126
Copy link
Contributor

abbrowne126 commented May 23, 2025

This was discovered in Pub/Sub, whereby futures dependent on this class hang if not set with a timeout when a throw occurs in BackgroundConsumer's _thread_main.

When we open a BackgroundConsumer, if something within the try block, e.g. open, throws, then the exception clauses log but do not close the underlying stream or thread.

I believe this will be fixed by adding allowing an optional parameter on_fatal_exception with which the consumer can opt to perform behavior with the fatal exception. With this, we can fail futures using the original exception that caused the RPC lifecycle to fail.

I will be submitting a PR to address this.

@abbrowne126 abbrowne126 changed the title Bidi BackgroundConsumer not Properly Shutting Down Thread and Stream on Exceptions Bidi BackgroundConsumer not Properly Notifying Caller on Fatal Processing Exceptions May 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants