Skip to content

Commit

Permalink
jrpc: Fix connection state propagation to listeners
Browse files Browse the repository at this point in the history
Resolved an issue where the connection state was not properly propagating to the listeners. This caused the data_sync client to fail to subscribe to objects and receive status updates, resulting in the companion not issuing new notifications unless it or Klippy was restarted.

Fixes #78
  • Loading branch information
Clon1998 committed Sep 7, 2024
1 parent 347620e commit 1806404
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions mobileraker/client/moonraker_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,10 @@ async def connect(self) -> None:
self._logger.info("websocket closed ?????...")
except exceptions.ConnectionClosed:
self._logger.info("websocket was closed...")
self._notify_connection_listeners(False)
continue
except Exception as err:
self._logger.info("Unexpected exception occured %s", err)
finally:
self._notify_connection_listeners(False)
continue

async def send_method(self, method: str, callback: Optional[Callable[[Dict[str, Any], Optional[str]], Any]] = None, params: Optional[dict] = None, timeout: float = 10.0) -> int:

Expand Down

0 comments on commit 1806404

Please sign in to comment.