aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Leon Sandøy <[email protected]>2020-05-28 12:45:26 +0200
committerGravatar Leon Sandøy <[email protected]>2020-05-28 12:45:26 +0200
commitcc45960406f64a791a15cf9de76614103fda384b (patch)
treef5ffb73b24fec7d08f3dd4718208f459555d5571
parentPrevent a state where a coro could wait forever. (diff)
Move the `self.redis_closed` into session create.
-rw-r--r--bot/bot.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bot/bot.py b/bot/bot.py
index ba09ce207..313652d11 100644
--- a/bot/bot.py
+++ b/bot/bot.py
@@ -70,6 +70,7 @@ class Bot(commands.Bot):
password=constants.Redis.password,
)
+ self.redis_closed = False
self.redis_ready.set()
def add_cog(self, cog: commands.Cog) -> None:
@@ -137,7 +138,6 @@ class Bot(commands.Bot):
# Create the redis session
self.loop.create_task(self._create_redis_session())
- self.redis_closed = False
# Use AF_INET as its socket family to prevent HTTPS related problems both locally
# and in production.