diff --git a/src/socketio/asyncio_redis_manager.py b/src/socketio/asyncio_redis_manager.py index 41a62c6..d9da5f9 100644 --- a/src/socketio/asyncio_redis_manager.py +++ b/src/socketio/asyncio_redis_manager.py @@ -51,7 +51,7 @@ class AsyncRedisManager(AsyncPubSubManager): # pragma: no cover def _redis_connect(self): self.redis = aioredis.Redis.from_url(self.redis_url, **self.redis_options) - self.pubsub = self.redis.pubsub() + self.pubsub = self.redis.pubsub(ignore_subscribe_messages=True) async def _publish(self, data): retry = True diff --git a/src/socketio/redis_manager.py b/src/socketio/redis_manager.py index 6ac0601..ab40739 100644 --- a/src/socketio/redis_manager.py +++ b/src/socketio/redis_manager.py @@ -70,7 +70,7 @@ class RedisManager(PubSubManager): # pragma: no cover def _redis_connect(self): self.redis = redis.Redis.from_url(self.redis_url, **self.redis_options) - self.pubsub = self.redis.pubsub() + self.pubsub = self.redis.pubsub(ignore_subscribe_messages=True) def _publish(self, data): retry = True