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

binder: Fix a ServiceConnection leak #8861

Merged
merged 3 commits into from Jan 25, 2022
Merged

binder: Fix a ServiceConnection leak #8861

merged 3 commits into from Jan 25, 2022

Conversation

jdcormie
Copy link
Member

Closes #8726

@jdcormie jdcormie requested a review from markb74 January 24, 2022 23:20
@@ -67,6 +67,7 @@ public void setUp() {

shadowApplication = shadowOf(appContext);
shadowApplication.setComponentNameAndServiceForBindService(serviceComponent, mockBinder);
shadowApplication.setUnbindServiceCallsOnServiceDisconnected(false);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need a test case for when this is true?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No because "true" (the default) means preserve a certain legacy robolectric behavior that doesn't match what any version of Android has ever done. I can add a comment to explain.

@jdcormie jdcormie merged commit 1283245 into grpc:master Jan 25, 2022
@ejona86
Copy link
Member

ejona86 commented Feb 9, 2022

How common was this issue? Should it be backported? There may be a 1.44.1 soon.

@jdcormie
Copy link
Member Author

jdcormie commented Feb 9, 2022

It only happens when the connection would have failed anyway, say because the server app isn't installed or the client's manifest is misconfigured. So probably not super important to back port but I don't feel strongly either way.

ejona86 pushed a commit to ejona86/grpc-java that referenced this pull request Feb 9, 2022
@ejona86
Copy link
Member

ejona86 commented Feb 9, 2022

I see. Yeah, probably not too big of a deal. But I'll go ahead and backport it since I have a script that makes it easy and it is a legitimate leak.

ejona86 pushed a commit that referenced this pull request Feb 9, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants