From 80e57f9a2c7982f2e5f4f362a8aa6bd968fceb03 Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Sat, 3 Aug 2024 01:53:22 -0700 Subject: [PATCH] fixesToReconnectWifi ok for real I think I resolved it I hope https://github.com/SpudGunMan/meshing-around/issues/26 --- modules/system.py | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/modules/system.py b/modules/system.py index 9bb8726..b631349 100644 --- a/modules/system.py +++ b/modules/system.py @@ -463,7 +463,6 @@ async def watchdog(): while True: await asyncio.sleep(20) #print(f"{log_timestamp()} System: watchdog running\r", end="") - retryConnect = False if interface1 is not None and not retry_int1: try: with suppress_stdout(): @@ -471,30 +470,24 @@ async def watchdog(): #if "device_state_version:" not in meta: except Exception as e: print(f"{log_timestamp()} System: Error communicating with interface1, trying to reconnect: {e}") - retryConnect = True - if retryConnect: + if retry_int1: try: await retry_interface(1) - retryConnect = False except Exception as e: print(f"{log_timestamp()} System: Error retrying interface1: {e}") - retryConnect = True if interface2_enabled: - retryConnect = False if interface2 is not None and not retry_int2: try: with suppress_stdout(): meta = interface2.localNode.getMetadata() except Exception as e: print(f"{log_timestamp()} System: Error communicating with interface2, trying to reconnect: {e}") - retryConnect = True - if retryConnect: + if retry_int2: try: await retry_interface(2) - retryConnect = False except Exception as e: print(f"{log_timestamp()} System: Error retrying interface2: {e}") - retryConnect = True +