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

Skip to content

test: fix BackgroundConsumer error log #814

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

Merged
merged 6 commits into from
Apr 10, 2025
Merged

test: fix BackgroundConsumer error log #814

merged 6 commits into from
Apr 10, 2025

Conversation

daniel-sanche
Copy link
Contributor

We #770 that clears some variables that were causing a memory leak in the bidirectional streaming classes. This change lead to a potential null pointer exception during the shut-down process when the BackgroundConsumer tries to access the removed callback.

The issue would only come up when the background thread failed to finalize within 1 second, and the error would be swallowed internally. But it would result in an error log that should be avoided

This PR does a None check to avoid emitting the error log

Fixes #788

@daniel-sanche daniel-sanche requested review from a team as code owners April 4, 2025 22:20
@product-auto-label product-auto-label bot added the size: s Pull request size is small. label Apr 4, 2025
@product-auto-label product-auto-label bot added size: m Pull request size is medium. and removed size: s Pull request size is small. labels Apr 4, 2025
@product-auto-label product-auto-label bot added size: l Pull request size is large. and removed size: m Pull request size is medium. labels Apr 5, 2025
@product-auto-label product-auto-label bot added size: s Pull request size is small. and removed size: l Pull request size is large. labels Apr 5, 2025
@daniel-sanche daniel-sanche merged commit 66d84a3 into main Apr 10, 2025
47 checks passed
@daniel-sanche daniel-sanche deleted the b_788 branch April 10, 2025 23:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: s Pull request size is small.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BackgroundConsumer destruction issues
2 participants