Browse Source

Bugfix: self.channel not initialised

_redis_connect expects self.channel to be initialised, otherwise getting exception "object has no attribute 'channel'" at line 70
pull/1476/head
Eugnee 5 days ago
committed by GitHub
parent
commit
260835b0c4
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      src/socketio/async_redis_manager.py

2
src/socketio/async_redis_manager.py

@ -54,8 +54,8 @@ class AsyncRedisManager(AsyncPubSubManager): # pragma: no cover
raise RuntimeError('Version 2 of aioredis package is required.') raise RuntimeError('Version 2 of aioredis package is required.')
self.redis_url = url self.redis_url = url
self.redis_options = redis_options or {} self.redis_options = redis_options or {}
self._redis_connect()
super().__init__(channel=channel, write_only=write_only, logger=logger) super().__init__(channel=channel, write_only=write_only, logger=logger)
self._redis_connect()
def _redis_connect(self): def _redis_connect(self):
if not self.redis_url.startswith('redis+sentinel://'): if not self.redis_url.startswith('redis+sentinel://'):

Loading…
Cancel
Save