aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRapptz <[email protected]>2019-06-20 23:04:38 -0400
committerRapptz <[email protected]>2019-06-20 23:04:38 -0400
commit8f691ae77598d094d8efb5c94a2794123dff1875 (patch)
tree4b5a5b98a3acfe0726b7f13d8c0b761ff9ecea8d
parentPropagate exception in Client.run (diff)
downloaddiscord.py-8f691ae77598d094d8efb5c94a2794123dff1875.tar.xz
discord.py-8f691ae77598d094d8efb5c94a2794123dff1875.zip
Only return exception in Client.run when it's not cancelled.
-rw-r--r--discord/client.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/discord/client.py b/discord/client.py
index 3f32a511..e4804594 100644
--- a/discord/client.py
+++ b/discord/client.py
@@ -594,7 +594,8 @@ class Client:
log.info('Cleaning up tasks.')
_cleanup_loop(loop)
- return future.result()
+ if not future.cancelled():
+ return future.result()
# properties