| 781 | } |
| 782 | |
| 783 | void tcp_client_endpoint_impl::wait_until_sent(const boost::system::error_code& _error) { |
| 784 | if (_error && _error != boost::asio::error::operation_aborted) { |
| 785 | // This Function is usually called with boost::asio::error::operation_aborted |
| 786 | // and therefore its part of its normal execution path. |
| 787 | VSOMEIP_WARNING_P << _error.value() << ", message: " << _error.message(); |
| 788 | } |
| 789 | std::unique_lock<std::recursive_mutex> its_lock(mutex_); |
| 790 | if (!is_sending_ || !_error) { |
| 791 | its_lock.unlock(); |
| 792 | if (!_error) |
| 793 | VSOMEIP_WARNING_P << "Maximum wait time for send operation exceeded for tce."; |
| 794 | |
| 795 | std::shared_ptr<boardnet_endpoint_host> its_ep_host = endpoint_host_.lock(); |
| 796 | its_ep_host->on_disconnect(shared_from_this()); |
| 797 | restart(true); |
| 798 | } else { |
| 799 | std::chrono::milliseconds its_timeout(VSOMEIP_MAX_TCP_SENT_WAIT_TIME); |
| 800 | sent_timer_.expires_after(its_timeout); |
| 801 | sent_timer_.async_wait(std::bind(&tcp_client_endpoint_impl::wait_until_sent, |
| 802 | std::dynamic_pointer_cast<tcp_client_endpoint_impl>(shared_from_this()), std::placeholders::_1)); |
| 803 | } |
| 804 | } |
| 805 | |
| 806 | } // namespace vsomeip_v3 |
no test coverage detected