redis-async-rs
redis-async-rs copied to clipboard
Resolve pubsub future only when nothing can happen anymore
With these changes PubsubConnectionInner should complete only if every PubsubConnection have been dropped.
It should be enough to guarantee that:
- there are no open subscriptions (
PubsubStreamkeeps a reference toPubsubConnectionand unsubscribes when dropped) - there's no one waiting on pending subscriptions (the promise keeps a reference to
PubsubConnection) - no one will subscribe again (you need a
PubsubConnectionto do that)
Fixes #50
Any chance this PR could be accepted ?