Fix send_as_json not dispatching socket_raw_send
This commit is contained in:
parent
52e8c06aed
commit
9bc48b21f5
@ -456,7 +456,7 @@ class DiscordWebSocket(websockets.client.WebSocketClientProtocol):
|
|||||||
|
|
||||||
async def send_as_json(self, data):
|
async def send_as_json(self, data):
|
||||||
try:
|
try:
|
||||||
await super().send(utils.to_json(data))
|
await self.send(utils.to_json(data))
|
||||||
except websockets.exceptions.ConnectionClosed as e:
|
except websockets.exceptions.ConnectionClosed as e:
|
||||||
if not self._can_handle_close(e.code):
|
if not self._can_handle_close(e.code):
|
||||||
raise ConnectionClosed(e, shard_id=self.shard_id) from e
|
raise ConnectionClosed(e, shard_id=self.shard_id) from e
|
||||||
|
Loading…
x
Reference in New Issue
Block a user