Skip to content

Commit

Permalink
set call_finished_ with true for each call inside callFinished
Browse files Browse the repository at this point in the history
and also set current_call flags when failure happens

Signed-off-by: Chen Lihui <lihui.chen@sony.com>
  • Loading branch information
Chen Lihui committed Oct 13, 2020
1 parent 089dd64 commit 929a405
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions clients/roscpp/src/libros/service_server_link.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,10 @@ void ServiceServerLink::onResponseOkAndLength(const ConnectionPtr& conn, const b

if (len > 1000000000)
{
{
boost::mutex::scoped_lock lock(call_queue_mutex_);
current_call_->call_finished_ = true;
}
ROS_ERROR("a message of over a gigabyte was " \
"predicted in tcpros. that seems highly " \
"unlikely, so I'll assume protocol " \
Expand Down Expand Up @@ -262,6 +266,7 @@ void ServiceServerLink::callFinished()

current_call_->finished_ = true;
current_call_->finished_condition_.notify_all();
current_call_->call_finished_ = true;

saved_call = current_call_;
current_call_ = CallInfoPtr();
Expand Down

0 comments on commit 929a405

Please sign in to comment.