redis icon indicating copy to clipboard operation
redis copied to clipboard

Wrong behavior on single subscription unsubscribe

Open juffin-halli opened this issue 7 months ago • 0 comments

If you have only one subscription and then unsubscribe from it, Amp\Redis\RedisSubscriber will become to invalid state. Amp\Redis\RedisSubscription::unsubscribe internally calls Amp\Redis\RedisSubscriber::unloadEmitter which checks isIdle and disconnects but runnging flag stays true. So, if you want to get another subscription after it, Amp\Redis\RedisSubscriber::run won't be called (and it will not perform connect therefore) and 'Redis connection already closed' exception will be thrown.

juffin-halli avatar Jul 25 '24 05:07 juffin-halli