Skip to content

Commit

Permalink
reverted last commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Clon1998 committed Sep 7, 2024
1 parent 07782eb commit 38dced5
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions mobileraker/service/data_sync_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,16 +81,7 @@ def __init__(
'notify_gcode_response', lambda resp: self._on_gcode_response(resp["params"][0]))

self._jrpc.register_connection_listener(
lambda is_conncected: self._loop.create_task(self._handle_connection_event(is_conncected)))

async def _handle_connection_event(self, is_connected: bool):
try:
await self._loop.create_task(self._jrpc_connection_listener(is_connected))
except asyncio.CancelledError:
pass # Task was cancelled, which is okay
except Exception as e:
self._logger.error(f"Error in connection listener: {e}")

lambda is_connected: self._loop.create_task(self._jrpc_connection_listener(is_connected)))

def _parse_objects(self, status_objects: Dict[str, Any], err: Optional[str] = None) -> None:
'''
Expand Down

0 comments on commit 38dced5

Please sign in to comment.