From 9d3d8e0f0aacb22b0a7d4984f4ed21537db480f8 Mon Sep 17 00:00:00 2001 From: BeatButton Date: Sun, 11 Feb 2018 09:41:18 -0700 Subject: Fix websockets 4.0 support --- discord/gateway.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'discord') diff --git a/discord/gateway.py b/discord/gateway.py index c995ef46..6d535a38 100644 --- a/discord/gateway.py +++ b/discord/gateway.py @@ -516,11 +516,11 @@ class DiscordWebSocket(websockets.client.WebSocketClientProtocol): yield from self.send_as_json(payload) @asyncio.coroutine - def close_connection(self, force=False): + def close_connection(self, *args, **kwargs): if self._keep_alive: self._keep_alive.stop() - yield from super().close_connection(force=force) + yield from super().close_connection(*args, **kwargs) class DiscordVoiceWebSocket(websockets.client.WebSocketClientProtocol): """Implements the websocket protocol for handling voice connections. @@ -701,10 +701,10 @@ class DiscordVoiceWebSocket(websockets.client.WebSocketClientProtocol): raise ConnectionClosed(e, shard_id=None) from e @asyncio.coroutine - def close_connection(self, force=False): + def close_connection(self, *args, **kwargs): if self._keep_alive: self._keep_alive.stop() - yield from super().close_connection(force=force) + yield from super().close_connection(*args, **kwargs) -- cgit v1.2.3