Skip to content

Commit

Permalink
Revert "Fix pour dvd-dev/hilo#282"
Browse files Browse the repository at this point in the history
This reverts commit d0ea766.
  • Loading branch information
ic-dev21 committed Oct 3, 2023
1 parent d0ea766 commit 9f5b02d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pyhilo/websocket.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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)
Expand Down

0 comments on commit 9f5b02d

Please sign in to comment.