mirror of
https://github.com/agessaman/meshcore-bot.git
synced 2026-10-23 22:32:29 +00:00
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:
1 parent
83dea195a4
commit
1474174ba5
1 file changed
+1
-1
@@ -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.")
|
||||
|
||||
Reference in new issue
Block a user