Commit b8b38d3a authored by Fernando Herrero's avatar Fernando Herrero
Browse files

Unlock mutex on sleeps

parent c37febb8
......@@ -96,7 +96,11 @@ bool AdcJuryServerAlgNode::jury_modeCallback(iri_adc_msgs::jury_mode::Request &r
//do operations with req and output on res
if(this->config_.block_service)
{
this->alg_.unlock();
sleep(this->config_.block_service_time);
this->alg_.lock();
}
//res.data2 = req.data1 + my_var;
......@@ -183,7 +187,9 @@ void AdcJuryServerAlgNode::adc_juryGetFeedbackCallback(iri_adc_msgs::adc_juryFee
//ROS_INFO("AdcJuryServerAlgNode::adc_juryGetFeedbackCallback feedback.status='%s'", feedback->status.c_str());
if(this->config_.block_feedback)
{
this->alg_.unlock();
sleep(this->config_.block_feedback_time);
this->alg_.lock();
}
this->alg_.unlock();
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment