diff options
Diffstat (limited to 'discord/client.py')
| -rw-r--r-- | discord/client.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/discord/client.py b/discord/client.py index 0fcdcd48..85931569 100644 --- a/discord/client.py +++ b/discord/client.py @@ -32,7 +32,6 @@ import sys import traceback import aiohttp -import websockets from .user import User, Profile from .asset import Asset @@ -497,9 +496,7 @@ class Client: GatewayNotFound, ConnectionClosed, aiohttp.ClientError, - asyncio.TimeoutError, - websockets.InvalidHandshake, - websockets.WebSocketProtocolError) as exc: + asyncio.TimeoutError) as exc: self.dispatch('disconnect') if not reconnect: @@ -632,7 +629,11 @@ class Client: _cleanup_loop(loop) if not future.cancelled(): - return future.result() + try: + return future.result() + except KeyboardInterrupt: + # I am unsure why this gets raised here but suppress it anyway + return None # properties |