Skip to content
This repository was archived by the owner on Feb 23, 2026. It is now read-only.
This repository was archived by the owner on Feb 23, 2026. It is now read-only.

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

Description

@abbrowne126

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions