Skip to content

Commit

Permalink
core: autopilot_manager: Fix error on change router
Browse files Browse the repository at this point in the history
* Fix error adding endpoints that are not compatible when changing
  prefered router
  • Loading branch information
JoaoMario109 committed Nov 25, 2024
1 parent 7331306 commit c2580c5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion core/services/ardupilot_manager/mavlink_proxy/Manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,10 @@ async def set_preferred_router(self, router_name: str) -> None:
await self.stop()
self.tool = AbstractRouter.get_interface(router_name)()
for endpoint in endpoints:
self.tool.add_endpoint(endpoint)
try:
self.tool.add_endpoint(endpoint)
except Exception as error:
logger.warning(str(error))
if master_endpoint:
await self.start(master_endpoint)
except Exception as error:
Expand Down

0 comments on commit c2580c5

Please sign in to comment.