aboutsummaryrefslogtreecommitdiffstats
path: root/botcore
diff options
context:
space:
mode:
authorGravatar Hassan Abouelela <[email protected]>2022-07-26 00:03:55 +0200
committerGravatar GitHub <[email protected]>2022-07-26 00:03:55 +0200
commit2093ab5685b2f2d7baba72ee3ee216f2519a36bc (patch)
tree77e1f7b2a2a0d1efb6460c04f95c251727606ad1 /botcore
parentBump Python To 3.10 (#108) (diff)
parentBump async-rediscache to v1.0.0-rc2 (diff)
Merge pull request #110 from python-discord/async-rediscache-bumpv8.0.0-beta.3
Bump async-rediscache to v1.0.0-rc2
Diffstat (limited to 'botcore')
-rw-r--r--botcore/_bot.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/botcore/_bot.py b/botcore/_bot.py
index 8bea4385..e3d9aac3 100644
--- a/botcore/_bot.py
+++ b/botcore/_bot.py
@@ -234,10 +234,10 @@ class BotBase(commands.Bot):
)
self.http.connector = self._connector
- if getattr(self, "redis_session", False) and self.redis_session.closed:
+ if getattr(self, "redis_session", False) and not self.redis_session.valid:
# If the RedisSession was somehow closed, we try to reconnect it
# here. Normally, this shouldn't happen.
- await self.redis_session.connect()
+ await self.redis_session.connect(ping=True)
# Create dummy stats client first, in case `statsd_url` is unreachable or None
self.stats = AsyncStatsClient(loop, "127.0.0.1")