mirror of
https://github.com/MarekWo/mc-webui.git
synced 2026-08-06 16:53:21 +02:00
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 <noreply@anthropic.com>
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user