| 2290 | } |
| 2291 | |
| 2292 | void routing_manager_client::restart_sender([[maybe_unused]] std::unique_lock<std::mutex> const& _sender_mutex) { |
| 2293 | if (sender_) { |
| 2294 | sender_->stop(true); |
| 2295 | sender_ = nullptr; |
| 2296 | } |
| 2297 | if (sender_debounce_active_) { |
| 2298 | start_sender_after_debounce_ = true; |
| 2299 | VSOMEIP_INFO_P << "The restart of the sender is debounced"; |
| 2300 | return; |
| 2301 | } |
| 2302 | start_sender_after_debounce_ = false; |
| 2303 | if (!state_machine_->start_registration()) { |
| 2304 | VSOMEIP_WARNING_P << "(" << hex4(get_client()) << ") Non-Deregistered State Set (" << state_machine_->state() << "). Returning"; |
| 2305 | return; |
| 2306 | } |
| 2307 | sender_ = ep_mgr_->create_routing_client(); |
| 2308 | if (sender_) { |
| 2309 | // save to read even without acquiring the provider_mutex_, as a new |
| 2310 | // token is only generated during a reconnect or stop, start sequence, |
| 2311 | // which are serialized with the start of the sender. |
| 2312 | sender_->start(lc_count_.load()); |
| 2313 | sender_debounce_active_ = true; |
| 2314 | sender_debounce_->start(); |
| 2315 | } else { |
| 2316 | VSOMEIP_ERROR_P << "Failed due to a missing sender"; |
| 2317 | } |
| 2318 | } |
| 2319 | |
| 2320 | void routing_manager_client::debounce_restart_sender_done() { |
| 2321 | std::unique_lock its_sender_lock(sender_mutex_); |
nothing calls this directly
no test coverage detected