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

chainHead subscriptions aren't cleaned up properly #805

Closed
tomaka opened this issue Jun 23, 2023 · 1 comment · Fixed by #818
Closed

chainHead subscriptions aren't cleaned up properly #805

tomaka opened this issue Jun 23, 2023 · 1 comment · Fixed by #818

Comments

@tomaka
Copy link
Contributor

tomaka commented Jun 23, 2023

Problem introduced in #793

The subscriptions are never cleaned up. By itself this isn't a problem, but then at some point the limit to the number of subscriptions will be reached.

@tomaka
Copy link
Contributor Author

tomaka commented Jun 23, 2023

After some thinking, I think that the best course of action is to generate a SubscriptionDestroyed event (from run_until_event) once a Subscription is destroyed. This would let the API user do some local clean up.

The client main task should also only ever count a subscription as unsubscribed after the Subscription object is destroyed, rather than immediately.

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.

1 participant