diff --git a/packages/syft/src/syft/service/network/node_peer.py b/packages/syft/src/syft/service/network/node_peer.py index 23c1ffc7057..efb3b35c831 100644 --- a/packages/syft/src/syft/service/network/node_peer.py +++ b/packages/syft/src/syft/service/network/node_peer.py @@ -146,9 +146,8 @@ def pick_highest_priority_route(self, oldest: bool = True) -> NodeRoute: if oldest: if route.priority < highest_priority_route.priority: highest_priority_route = route - else: - if route.priority > highest_priority_route.priority: - highest_priority_route = route + elif route.priority > highest_priority_route.priority: + highest_priority_route = route return highest_priority_route def update_route(self, route: NodeRoute) -> None: