From 7f7bafbaaeba528ffa57ed4d2f415edcb95c8666 Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Wed, 31 Jul 2024 23:56:16 -0700 Subject: [PATCH] on disconnect runaway trying to fix a runaway loop on disconnect --- mesh_bot.py | 1 + modules/system.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/mesh_bot.py b/mesh_bot.py index c612562..4b102e4 100755 --- a/mesh_bot.py +++ b/mesh_bot.py @@ -351,6 +351,7 @@ async def main(): await asyncio.wait([meshRxTask, watchdogTask, hamlibTask]) else: await asyncio.wait([meshRxTask, watchdogTask]) + await asyncio.sleep(0.01) try: if __name__ == "__main__": diff --git a/modules/system.py b/modules/system.py index efdf226..17b133b 100644 --- a/modules/system.py +++ b/modules/system.py @@ -400,7 +400,7 @@ async def retry_interface(nodeID=1): except Exception as e: print(f"{log_timestamp()} System: Error opening interface1: {e}") await asyncio.sleep(5) - await retry_interface(nodeID) + await retry_interface(1) try: if nodeID==2: @@ -415,7 +415,7 @@ async def retry_interface(nodeID=1): except Exception as e: print(f"{log_timestamp()} System: Error opening interface2: {e}") await asyncio.sleep(5) - await retry_interface(nodeID) + await retry_interface(2) # this is a workaround because .localNode.getMetadata spits out a lot of debug info which cant be suppressed