Don't call close() if we've already been closed in Client.run

This commit is contained in:
alkatar21 2020-09-01 21:24:47 +02:00 committed by Rapptz
parent b3e0752af4
commit 85a51c1464

View File

@ -657,6 +657,7 @@ class Client:
try: try:
await self.start(*args, **kwargs) await self.start(*args, **kwargs)
finally: finally:
if not self.is_closed():
await self.close() await self.close()
def stop_loop_on_completion(f): def stop_loop_on_completion(f):