redis-async-rs icon indicating copy to clipboard operation
redis-async-rs copied to clipboard

Resolve pubsub future only when nothing can happen anymore

Open dippi opened this issue 4 years ago • 1 comments

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 (PubsubStream keeps a reference to PubsubConnection and 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 PubsubConnection to do that)

Fixes #50

dippi avatar Jul 04 '21 10:07 dippi

Any chance this PR could be accepted ?

mcatanzariti avatar Jul 29 '22 10:07 mcatanzariti