From 923d03a8040251ae7766b9655a3d0ff9f8413c8b Mon Sep 17 00:00:00 2001 From: MarkKoz Date: Sat, 23 May 2020 11:14:13 -0700 Subject: Show a warning when redis pool isn't closed --- bot/bot.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bot/bot.py b/bot/bot.py index 224f5f4e4..bf7f9c9df 100644 --- a/bot/bot.py +++ b/bot/bot.py @@ -112,6 +112,11 @@ class Bot(commands.Bot): "The previous connector was not closed; it will remain open and be overwritten" ) + if self.redis_session and not self.redis_session.closed: + log.warning( + "The previous redis pool was not closed; it will remain open and be overwritten" + ) + # Create the redis session self.loop.create_task(self._create_redis_session()) -- cgit v1.2.3