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

Subscription Should be Cancelled on Interceptor Close #304

Closed
jGleitz opened this issue Dec 14, 2022 · 3 comments · Fixed by #305
Closed

Subscription Should be Cancelled on Interceptor Close #304

jGleitz opened this issue Dec 14, 2022 · 3 comments · Fixed by #305

Comments

@jGleitz
Copy link
Contributor

jGleitz commented Dec 14, 2022

When an interceptor closes the call, the reactive subscription is not cancelled. This means that any resource allocated for a call are not removed, either, and effectively leak.

To circumvent this, I think the library should listen ServerCall.Listener.onComplete and ServerCall.Listener.onCancel, and cancel its subscription of the reactive sequence in reaction to it (if the sequence hasn’t completed yet).

@jGleitz
Copy link
Contributor Author

jGleitz commented Dec 14, 2022

Here’s a fix and a test case reproducing the issue: #305

@jGleitz
Copy link
Contributor Author

jGleitz commented Dec 19, 2022

@rmichela thank you for reviewing & merging so quickly! Do you have the chance to publish a release? We’d like to profit from the changes as soon as possible.

@rmichela
Copy link
Collaborator

I lost my publish rights when I left Salesforce. Still working on getting someone to fill that role.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants