| 1019 | } |
| 1020 | |
| 1021 | void tcp_server_endpoint_impl::connection::wait_until_sent(const boost::system::error_code& _error) { |
| 1022 | std::shared_ptr<tcp_server_endpoint_impl> its_server(server_.lock()); |
| 1023 | if (!its_server) |
| 1024 | return; |
| 1025 | |
| 1026 | std::scoped_lock its_lock(its_server->mutex_); |
| 1027 | |
| 1028 | auto it = its_server->targets_.find(remote_); |
| 1029 | if (it != its_server->targets_.end()) { |
| 1030 | auto& its_data = it->second; |
| 1031 | if (its_data.is_sending_ && _error) { |
| 1032 | std::chrono::milliseconds its_timeout(VSOMEIP_MAX_TCP_SENT_WAIT_TIME); |
| 1033 | its_data.sent_timer_.expires_after(its_timeout); |
| 1034 | its_data.sent_timer_.async_wait(std::bind(&tcp_server_endpoint_impl::connection::wait_until_sent, |
| 1035 | std::dynamic_pointer_cast<tcp_server_endpoint_impl::connection>(shared_from_this()), |
| 1036 | std::placeholders::_1)); |
| 1037 | return; |
| 1038 | } else { |
| 1039 | std::scoped_lock its_lock_inner{socket_mutex_}; |
| 1040 | VSOMEIP_WARNING_P << instance_name_ << "Maximum wait time for send operation exceeded for tse." |
| 1041 | << " local: " << get_address_port_local() << " remote: " << get_address_port_remote(); |
| 1042 | } |
| 1043 | } |
| 1044 | { |
| 1045 | std::scoped_lock its_lock_inner(its_server->connections_mutex_); |
| 1046 | stop(); |
| 1047 | } |
| 1048 | its_server->remove_connection(remote_, this); |
| 1049 | } |
| 1050 | } // namespace vsomeip_v3 |
nothing calls this directly
no test coverage detected