async def poll_event(self):
try:<EOL><INDENT>msg = await self.recv()<EOL>await self.received_message(msg)<EOL><DEDENT>except websockets.exceptions.ConnectionClosed as exc:<EOL><INDENT>if self._can_handle_close(exc.code):<EOL><INDENT>log.info('<STR_LIT>', exc.code, exc.reason)<EOL>raise ResumeWebSocket(self.shard_id) from exc<EOL><DEDENT>else:<EOL><INDENT>log.info('<STR_LIT>', exc.code, exc.reason)<EOL>raise ConnectionClosed(exc, shard_id=self.shard_id) from exc<EOL><DEDENT><DEDENT>
Polls for a DISPATCH event and handles the general gateway loop.

        Raises
        ------
        ConnectionClosed
            The websocket connection was terminated for unhandled reasons.