COVESA / vsomeip

An implementation of Scalable service-Oriented MiddlewarE over IP
Mozilla Public License 2.0
1.01k stars 647 forks source link

unset is_sending_ during tce restart #689

Open joeyoravec opened 2 weeks ago

joeyoravec commented 2 weeks ago

fixes #668

During tcp_client_endpoint_impl::restart() the queue_ will be drained, messages printed like

tce::restart: dropping message: remote:10.6.0.3:30510 (30fd): [0402.0001.018e] size: 23

and if is_sending_ was set nothing will unset. Later in connect_cbk():

auto its_entry = get_front();
if (its_entry.first) {
    is_sending_ = true;
    strand_.dispatch(std::bind(&client_endpoint_impl::send_queued,
            this->shared_from_this(), its_entry));
    VSOMEIP_WARNING << __func__ << ": resume sending to: "
            << get_remote_information();
}

there's nothing queued, no reason to call send_queued, therefore no callback is going to clear the flag. Flag is_sending_ remains set "forever" and the train logic remains blocked from sending. From a user perspective the client endpoint would receive notifications but never transmit anything again.

This needs to be cleared during restart() when queue_ gets drained