Refactor path handling in TraceCommand to prevent truncation of return paths

- Updated the logic in `TraceCommand` to avoid capping the `path_nodes` after building the reciprocal path, ensuring that the return path is preserved.
- Improved clarity in the code by adding a comment to explain the rationale behind the change.
This commit is contained in:
agessaman committed 2026-03-03 18:55:44 -08:00
1 parent 83dea195a4
commit 1474174ba5
1 file changed
+1 -1
+1 -1
View File
@@ -195,7 +195,7 @@ class TraceCommand(BaseCommand):
# Use reciprocal path for tracer (always) or when no path given (so round-trip completes)
if is_tracer or path_arg is None:
path_nodes = self._build_reciprocal_path(path_nodes)
path_nodes = path_nodes[: self.maximum_hops]
# Do not cap here: outbound was already capped above; truncating would drop the return path
if not self.bot.connected or not self.bot.meshcore:
await self.send_response(message, "Not connected to radio.")