Commit 990927f
committed
nav2_util: break LifecycleServiceClient ctor wait loop on shutdown
LifecycleServiceClient's constructor blocks on wait_for_service() in a
loop. If the rcl context is invalidated mid-construction (e.g. the
process receives SIGINT before the dependent service comes up), both
wait_for_service() and Rate::sleep() return immediately, which spins
the loop tight and prevents the process from exiting.
Surfaced by test_costmap_subscriber_exec: after the gtest binary now
exits in ~50ms (post-PR-#5834 fixes), the launch wrapper SIGINTs a
lifecycle_manager whose constructor was still in this loop, and the
ctest timeout fires while the manager refuses to die.
Add an rclcpp::ok() check to the loop condition so context shutdown
breaks construction cleanly.
Signed-off-by: lotusymt <mengtiy5@uci.edu>1 parent 7e73798 commit 990927f
1 file changed
Lines changed: 3 additions & 2 deletions
File tree
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
| 48 | + | |
48 | 49 | | |
49 | | - | |
| 50 | + | |
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
| |||
0 commit comments