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

handleSubscription should unregister itself on close #35

Closed
aschmahmann opened this issue Aug 9, 2019 · 1 comment
Closed

handleSubscription should unregister itself on close #35

aschmahmann opened this issue Aug 9, 2019 · 1 comment

Comments

@aschmahmann
Copy link
Contributor

If for some reason the subscription dies or gets cancelled without being managed by PubsubValueStore.Cancel(key) then we can't resubscribe until we first call PubSubValueStore.Cancel(key).

func (p *PubsubValueStore) handleSubscription(sub *pubsub.Subscription, key string, cancel func()) {
defer sub.Cancel()
defer cancel()

If instead of just cancelling the subscription as above we triggered an internal cancellation function that would likely be better.

@aschmahmann
Copy link
Contributor Author

closed by #37

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

No branches or pull requests

1 participant