From d74a1572bb395c19818d735d2309ed9266bdd1fd Mon Sep 17 00:00:00 2001 From: MarekWo Date: Thu, 12 Mar 2026 21:26:58 +0100 Subject: [PATCH] feat(dm): increase retry attempts to 10, delay flood fallback to attempt 8 Keep direct path retries longer before falling back to flood mode, giving more time for ACK delivery on known routes. Co-Authored-By: Claude Opus 4.6 --- app/device_manager.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/device_manager.py b/app/device_manager.py index 1dacb0f..8c565d8 100644 --- a/app/device_manager.py +++ b/app/device_manager.py @@ -975,7 +975,7 @@ class DeviceManager: async def _dm_retry_task(self, dm_id: int, contact, text: str, timestamp: int, initial_ack: str, - suggested_timeout: int, max_attempts: int = 3): + suggested_timeout: int, max_attempts: int = 10): """Background retry with same timestamp for dedup on receiver.""" from meshcore.events import EventType @@ -995,7 +995,7 @@ class DeviceManager: # Retry with same timestamp, incrementing attempt for attempt in range(1, max_attempts): # After 2 failed direct attempts, reset path to flood - if attempt >= 2: + if attempt >= 8: try: await self.mc.commands.reset_path(contact) logger.info(f"DM retry {attempt}: reset path to flood")