Skip to content

Commit

Permalink
Merge branch 'master' into dev/amichon/master
Browse files Browse the repository at this point in the history
  • Loading branch information
amichon-kalray committed Jun 19, 2024
2 parents fa55517 + 8731295 commit 18e0dc3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/asio_service.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1423,6 +1423,15 @@ class asio_rpc_client
send_timeout_ms,
std::placeholders::_1,
std::placeholders::_2 ) );
if (send_timeout_ms != 0) {
operation_timer_.expires_after
( std::chrono::duration_cast<std::chrono::nanoseconds>
( std::chrono::milliseconds( send_timeout_ms ) ) );
operation_timer_.async_wait(
std::bind( &asio_rpc_client::cancel_socket,
this,
std::placeholders::_1 ) );
}
} else {
ptr<resp_msg> rsp;
ptr<rpc_exception> except
Expand Down Expand Up @@ -1493,6 +1502,7 @@ class asio_rpc_client
std::error_code err,
asio::ip::tcp::resolver::iterator itor)
{
operation_timer_.cancel();
if (!err) {
p_in( "%p connected to %s:%s (as a client)",
this, host_.c_str(), port_.c_str() );
Expand Down

0 comments on commit 18e0dc3

Please sign in to comment.