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 GitHub
parent ad04fbeee4
commit dce653a0eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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()