| 47 | } |
| 48 | |
| 49 | void endpoint_manager_base::stop() { |
| 50 | std::scoped_lock its_lock(mtx_); |
| 51 | if (!is_started_) { |
| 52 | return; |
| 53 | } |
| 54 | is_started_ = false; |
| 55 | ++lc_token_; |
| 56 | VSOMEIP_INFO_P << "Start endpoint flushing for client 0x" << hex4(get_client_id()); |
| 57 | for (auto const& [_, ep] : local_server_endpoints_) { |
| 58 | ep->start_flushing(); |
| 59 | } |
| 60 | for (auto const& [_, ep] : local_client_endpoints_) { |
| 61 | ep->start_flushing(); |
| 62 | } |
| 63 | for (auto const& [_, ep] : pending_server_endpoints_) { |
| 64 | ep->stop(true); // never started -> nothing to flush |
| 65 | } |
| 66 | pending_server_endpoints_.clear(); |
| 67 | } |
| 68 | |
| 69 | [[nodiscard]] bool endpoint_manager_base::await_stopped(std::chrono::milliseconds _timeout) { |
| 70 | std::unique_lock its_lock{mtx_}; |
no test coverage detected