aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralkatar21 <[email protected]>2020-09-01 21:24:47 +0200
committerGitHub <[email protected]>2020-09-01 15:24:47 -0400
commitdce653a0eba722f59e96d7385a89198c7fd6eac8 (patch)
treeb425ae259fc02a40bda9a611699eedcca365fb41
parent[commands] Added ColorConverter alias (diff)
downloaddiscord.py-dce653a0eba722f59e96d7385a89198c7fd6eac8.tar.xz
discord.py-dce653a0eba722f59e96d7385a89198c7fd6eac8.zip
Don't call close() if we've already been closed in Client.run
-rw-r--r--discord/client.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/discord/client.py b/discord/client.py
index 739f59c3..59be489a 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()