diff --git a/socketio/asyncio_aiopika_manager.py b/socketio/asyncio_aiopika_manager.py index beafc9a..905057d 100644 --- a/socketio/asyncio_aiopika_manager.py +++ b/socketio/asyncio_aiopika_manager.py @@ -89,6 +89,7 @@ class AsyncAioPikaManager(AsyncPubSubManager): # pragma: no cover self.listener_queue = await self._queue( self.listener_channel, exchange ) + retry_sleep = 1 async with self.listener_queue.iterator() as queue_iter: async for message in queue_iter: diff --git a/socketio/asyncio_redis_manager.py b/socketio/asyncio_redis_manager.py index e76645a..9762d3e 100644 --- a/socketio/asyncio_redis_manager.py +++ b/socketio/asyncio_redis_manager.py @@ -95,6 +95,7 @@ class AsyncRedisManager(AsyncPubSubManager): # pragma: no cover password=self.password, ssl=self.ssl ) self.ch = (await self.sub.subscribe(self.channel))[0] + retry_sleep = 1 return await self.ch.get() except (aioredis.RedisError, OSError): self._get_logger().error('Cannot receive from redis... ' diff --git a/socketio/redis_manager.py b/socketio/redis_manager.py index cef7624..4adb1ba 100644 --- a/socketio/redis_manager.py +++ b/socketio/redis_manager.py @@ -94,6 +94,7 @@ class RedisManager(PubSubManager): # pragma: no cover if connect: self._redis_connect() self.pubsub.subscribe(self.channel) + retry_sleep = 1 for message in self.pubsub.listen(): yield message except redis.exceptions.ConnectionError: