| 1588 | } |
| 1589 | |
| 1590 | void routing_manager_impl::remove_local(client_t _client) { |
| 1591 | |
| 1592 | std::set<std::tuple<service_t, instance_t, eventgroup_t>> its_clients_subscriptions; |
| 1593 | its_clients_subscriptions = get_subscriptions(_client); |
| 1594 | |
| 1595 | for (const auto& s : its_clients_subscriptions) { |
| 1596 | auto [service, instance, eventgroup] = s; |
| 1597 | { |
| 1598 | std::scoped_lock its_lock{remote_subscription_state_mutex_}; |
| 1599 | remote_subscription_state_.erase(std::tuple_cat(s, std::make_tuple(_client))); |
| 1600 | } |
| 1601 | unsubscribe(_client, service, instance, eventgroup, ANY_EVENT); |
| 1602 | } |
| 1603 | { |
| 1604 | std::scoped_lock its_lock(services_state_mutex_); |
| 1605 | // Finally remove all services that are implemented by the client. |
| 1606 | auto removed = local_services_table_.remove_all_for_client(_client); |
| 1607 | } |
| 1608 | |
| 1609 | for (const auto& s : get_requested_services(_client)) { |
| 1610 | release_service(_client, s.service_, s.instance_); |
| 1611 | } |
| 1612 | ep_mgr_impl_->remove_routing_endpoint(_client); |
| 1613 | } |
| 1614 | |
| 1615 | // only called from the SD |
| 1616 | void routing_manager_impl::add_routing_info(service_t _service, instance_t _instance, major_version_t _major, minor_version_t _minor, |
no test coverage detected