From aed90db5e8059df4e985b05afd2e14a89731e77a Mon Sep 17 00:00:00 2001 From: Tanner Collin Date: Tue, 30 Dec 2025 22:38:40 +0000 Subject: [PATCH] refactor: Replace pre-connect disconnect with a sleep --- main.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/main.py b/main.py index 567d6ef..2bede4f 100644 --- a/main.py +++ b/main.py @@ -94,13 +94,7 @@ async def trust_and_connect_device(device_path): device_iface = device_obj.get_interface(DEVICE_IFACE) - #try: - # logging.info(f"Attempting to disconnect {device_path} before connecting.") - # await device_iface.call_disconnect() - # await asyncio.sleep(1) # Give it a moment to settle - #except DBusError as e: - # # This is expected if the device is not already connected. - # logging.info(f"Disconnect failed (this is likely okay): {e}") + await asyncio.sleep(2) await device_iface.call_connect() logging.info(f'Connected to device {device_path}')