diff options
author | 2022-07-09 19:29:07 +0100 | |
---|---|---|
committer | 2022-07-09 19:29:07 +0100 | |
commit | 7a43f2390b117f759fff080207fb9c75a9ab66e6 (patch) | |
tree | 64cde33e3eb080d970ed1a63185d0a64ccaac025 /botcore | |
parent | Merge pull request #96 from python-discord/dont-connect-statsd-if-none (diff) |
Only close stats._transport if BotBase.stats was created
Diffstat (limited to 'botcore')
-rw-r--r-- | botcore/_bot.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/botcore/_bot.py b/botcore/_bot.py index a6362d0b..ee96faa9 100644 --- a/botcore/_bot.py +++ b/botcore/_bot.py @@ -281,7 +281,7 @@ class BotBase(commands.Bot): if self._resolver: await self._resolver.close() - if self.stats._transport: + if getattr(self.stats, "_transport", False): self.stats._transport.close() if getattr(self, "redis_session", False): |