From 9f5b02d53c456a7b324ca9071b90d5cfe7157a4f Mon Sep 17 00:00:00 2001 From: snaky69 <108159253+ic-dev21@users.noreply.github.com> Date: Mon, 2 Oct 2023 20:04:42 -0400 Subject: [PATCH] Revert "Fix pour dvd-dev/hilo#282" This reverts commit d0ea7669188233b36c94b0659d5c86ba8861eb2a. --- pyhilo/websocket.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pyhilo/websocket.py b/pyhilo/websocket.py index 17a406f..d18525c 100644 --- a/pyhilo/websocket.py +++ b/pyhilo/websocket.py @@ -298,7 +298,7 @@ async def _clean_queue(self) -> None: async def async_disconnect(self) -> None: """Disconnect from the websocket server.""" - await self._clean_queue() + self._clean_queue() if not self.connected: return @@ -319,12 +319,11 @@ async def async_listen(self) -> None: except ConnectionClosedError as err: LOG.error(f"Websocket: Closed while listening: {err}") LOG.exception(err) - await self._clean_queue() pass finally: LOG.info("Websocket: Listen completed; cleaning up") self._watchdog.cancel() - await self._clean_queue() + self._clean_queue() for callback in self._disconnect_callbacks: schedule_callback(callback)