Skip to content

Commit

Permalink
Add another lock guard in the set_component_state method
Browse files Browse the repository at this point in the history
  • Loading branch information
saikishor committed Jun 25, 2024
1 parent 017f0da commit 65ffd19
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions hardware_interface/src/resource_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1597,6 +1597,7 @@ return_type ResourceManager::set_component_state(
return false;
};

std::lock_guard<std::recursive_mutex> guard(resources_lock_);
bool found = find_set_component_state(
std::bind(&ResourceStorage::set_component_state<Actuator>, resource_storage_.get(), _1, _2),
resource_storage_->actuators_);
Expand Down

0 comments on commit 65ffd19

Please sign in to comment.