asyncio-redis icon indicating copy to clipboard operation
asyncio-redis copied to clipboard

pubsub incompatible with auto_reconnect

Open madgnome opened this issue 8 years ago • 1 comments

auto_reconnect can't be used with a connection with a pubsub subscription if the connection uses a password or specific db.

Traceback (most recent call last):
  File "/usr/local/Cellar/python3/3.4.3/Frameworks/Python.framework/Versions/3.4/lib/python3.4/asyncio/tasks.py", line 238, in _step
    result = next(coro)
  File "/Users/jhoarau/src/atlassian/misc/hc-standup2/venv/lib/python3.4/site-packages/asyncio_redis/protocol.py", line 813, in initialize
    yield from self.auth(self.password)
  File "/Users/jhoarau/src/atlassian/misc/hc-standup2/venv/lib/python3.4/site-packages/asyncio_redis/protocol.py", line 643, in wrapper
    raise Error('Cannot run command inside pubsub subscription.')

madgnome avatar Aug 24 '15 07:08 madgnome

auto_reconnect is broken even if a connection does not use any password or specific db. It will not re-subscribe after reconnect and the client will stuck forever. Broken re-authorization just makes the problem more apparent.

IlyaSemenov avatar Oct 09 '17 16:10 IlyaSemenov