mirror of
https://github.com/rightup/pyMC_Repeater.git
synced 2026-05-06 21:52:13 +02:00
fix: improve error message for max path size and add check for do-not-retransmit packets
This commit is contained in:
@@ -437,7 +437,7 @@ class RepeaterHandler(BaseHandler):
|
||||
return False, "Empty payload"
|
||||
|
||||
if len(packet.path or []) >= MAX_PATH_SIZE:
|
||||
return False, "Path at max size"
|
||||
return False, f"Path length {len(packet.path or [])} exceeds MAX_PATH_SIZE ({MAX_PATH_SIZE})"
|
||||
|
||||
return True, ""
|
||||
|
||||
@@ -529,6 +529,11 @@ class RepeaterHandler(BaseHandler):
|
||||
self._last_drop_reason = reason
|
||||
return None
|
||||
|
||||
# Check if packet is marked do-not-retransmit
|
||||
if packet.is_marked_do_not_retransmit():
|
||||
self._last_drop_reason = "Marked do not retransmit"
|
||||
return None
|
||||
|
||||
# Check global flood policy
|
||||
global_flood_allow = self.config.get("mesh", {}).get("global_flood_allow", True)
|
||||
if not global_flood_allow:
|
||||
|
||||
Reference in New Issue
Block a user