Skip to content

Commit

Permalink
fix conflict resolution mistakes
Browse files Browse the repository at this point in the history
  • Loading branch information
mikaelarguedas committed Jul 20, 2017
1 parent 2962689 commit 8cad7d6
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions bondcpp/src/bond.cpp
Expand Up @@ -232,13 +232,12 @@ bool Bond::waitUntilBroken(ros::WallDuration timeout)
boost::mutex::scoped_lock lock(mutex_);
ros::SteadyTime deadline(ros::SteadyTime::now() + timeout);

while (sm_.getState().getId() != SM::Dead.getId())
{
if (!ros::ok())
while (sm_.getState().getId() != SM::Dead.getId()) {
if (!ros::ok()) {
break;
}

ros::SteadyTime deadline(ros::SteadyTime::now() + timeout);
ros::WallDuration wait_time = ros::WallDuration(0.1);
if (timeout >= ros::WallDuration(0.0)) {
wait_time = std::min(wait_time, deadline - ros::SteadyTime::now());
}
Expand Down

0 comments on commit 8cad7d6

Please sign in to comment.