mirror of
https://github.com/Rapptz/discord.py.git
synced 2026-11-20 13:29:03 +00:00
Fix websockets 4.0 support
This commit is contained in:
1 parent
ad7506050c
commit
9d3d8e0f0a
2 files changed
+5
-5
No files matched your search
+4
-4
@@ -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)
|
||||
|
||||
|
||||
Reference in new issue
Block a user