Skip to content

Commit

Permalink
Merged error check with next elif statement
Browse files Browse the repository at this point in the history
  • Loading branch information
Jegarde authored and Lulalaby committed Apr 26, 2024
1 parent 182c4b9 commit 95f1ce6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions discord/gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -603,13 +603,11 @@ async def poll_event(self):
await self.received_message(msg.data)
elif msg.type is aiohttp.WSMsgType.BINARY:
await self.received_message(msg.data)
elif msg.type is aiohttp.WSMsgType.ERROR:
_log.debug("Received %s", msg)
raise WebSocketClosure
elif msg.type in (
aiohttp.WSMsgType.CLOSED,
aiohttp.WSMsgType.CLOSING,
aiohttp.WSMsgType.CLOSE,
aiohttp.WSMsgType.ERROR
):
_log.debug("Received %s", msg)
raise WebSocketClosure
Expand Down

0 comments on commit 95f1ce6

Please sign in to comment.