Fix traceroute timeout for case of 0-hops

It was not waiting any time.
This commit is contained in:
Lluís Batlle i Rossell
2025-11-29 15:40:33 +01:00
parent 5cc0dae394
commit d9057c0aaf

View File

@@ -670,7 +670,7 @@ class MeshInterface: # pylint: disable=R0902
hopLimit=hopLimit,
)
# extend timeout based on number of nodes, limit by configured hopLimit
waitFactor = min(len(self.nodes) - 1 if self.nodes else 0, hopLimit)
waitFactor = min(len(self.nodes) - 1 if self.nodes else 0, hopLimit+1)
self.waitForTraceRoute(waitFactor)
def onResponseTraceRoute(self, p: dict):