MCPcopy Create free account
hub / github.com/COVESA/vsomeip / wait_until_sent

Method wait_until_sent

implementation/endpoints/src/tcp_client_endpoint_impl.cpp:783–804  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

781}
782
783void 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

Callers 1

set_routing_stateMethod · 0.45

Calls 6

messageMethod · 0.80
unlockMethod · 0.80
lockMethod · 0.80
on_disconnectMethod · 0.80
expires_afterMethod · 0.45
async_waitMethod · 0.45

Tested by

no test coverage detected