Skip to content

Commit

Permalink
fix check for client
Browse files Browse the repository at this point in the history
  • Loading branch information
mikey0000 committed Aug 7, 2024
1 parent 79760be commit a2c02bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pymammotion/mammotion/devices/mammotion.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ async def run_periodic_sync_task(self) -> None:

def schedule_ble_sync(self):
"""Periodically sync to keep connection alive."""
if self._client.is_connected:
if self._client is not None and self._client.is_connected:
self._ble_sync_task = self.loop.call_later(
130, lambda: asyncio.ensure_future(self.run_periodic_sync_task())
)
Expand Down

0 comments on commit a2c02bd

Please sign in to comment.