Skip to content

Commit

Permalink
[tree-watcher] bugfix shutdown for humble
Browse files Browse the repository at this point in the history
  • Loading branch information
stonier committed Feb 7, 2023
1 parent 9727f50 commit 870f287
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions py_trees_ros/programs/tree_watcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,11 +223,11 @@ def main():
# xdot running, wait for it to terminate
break
executor.spin_once(timeout_sec=0.1)
except KeyboardInterrupt:
except (KeyboardInterrupt, rclpy.executors.ExternalShutdownException):
pass
finally:
if tree_watcher.xdot_process is not None:
if tree_watcher.xdot_process.poll() is not None:
tree_watcher.xdot_process.terminate()
tree_watcher.shutdown()
rclpy.shutdown()
rclpy.try_shutdown()

0 comments on commit 870f287

Please sign in to comment.