From 19e13aff6334d6f8b792fcc3dc63cf9f26d4e3ac Mon Sep 17 00:00:00 2001 From: snaky69 <108159253+ic-dev21@users.noreply.github.com> Date: Sat, 30 Sep 2023 12:55:23 -0400 Subject: [PATCH] Fix pour dvd-dev/hilo#282 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ajout d'un await pour que la coroutine s'exécute --- pyhilo/websocket.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyhilo/websocket.py b/pyhilo/websocket.py index d18525c..6b7af7a 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.""" - self._clean_queue() + await self._clean_queue() if not self.connected: return @@ -323,7 +323,7 @@ async def async_listen(self) -> None: finally: LOG.info("Websocket: Listen completed; cleaning up") self._watchdog.cancel() - self._clean_queue() + await self._clean_queue() for callback in self._disconnect_callbacks: schedule_callback(callback)