diff --git a/controller_manager/controller_manager/spawner.py b/controller_manager/controller_manager/spawner.py index ac319d027c..cf313e0e5a 100644 --- a/controller_manager/controller_manager/spawner.py +++ b/controller_manager/controller_manager/spawner.py @@ -420,6 +420,7 @@ def main(args=None): pass except ServiceNotFoundError as err: node.get_logger().fatal(str(err)) + return 1 finally: rclpy.shutdown() diff --git a/controller_manager/controller_manager/unspawner.py b/controller_manager/controller_manager/unspawner.py index ff4e2b06f2..e42d85aee9 100644 --- a/controller_manager/controller_manager/unspawner.py +++ b/controller_manager/controller_manager/unspawner.py @@ -62,6 +62,7 @@ def main(args=None): pass except ServiceNotFoundError as err: node.get_logger().fatal(str(err)) + return 1 finally: rclpy.shutdown()