From 85a51c1464eb2ad9651d0ae0d05a96f40887bc81 Mon Sep 17 00:00:00 2001 From: alkatar21 <61387986+alkatar21@users.noreply.github.com> Date: Tue, 1 Sep 2020 21:24:47 +0200 Subject: [PATCH] Don't call close() if we've already been closed in Client.run --- discord/client.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/discord/client.py b/discord/client.py index 435336c38..7c5ca5e55 100644 --- a/discord/client.py +++ b/discord/client.py @@ -657,7 +657,8 @@ class Client: try: await self.start(*args, **kwargs) finally: - await self.close() + if not self.is_closed(): + await self.close() def stop_loop_on_completion(f): loop.stop()