Skip to content

Commit 7129a9f

Browse files
Update meshtastic/mesh_interface.py
Co-authored-by: Copilot <[email protected]>
1 parent d9057c0 commit 7129a9f

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

meshtastic/mesh_interface.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,8 @@ def sendTraceRoute(
670670
hopLimit=hopLimit,
671671
)
672672
# extend timeout based on number of nodes, limit by configured hopLimit
673-
waitFactor = min(len(self.nodes) - 1 if self.nodes else 0, hopLimit+1)
673+
nodes_based_factor = (len(self.nodes) - 1) if self.nodes else (hopLimit + 1)
674+
waitFactor = max(1, min(nodes_based_factor, hopLimit + 1))
674675
self.waitForTraceRoute(waitFactor)
675676

676677
def onResponseTraceRoute(self, p: dict):

0 commit comments

Comments
 (0)