| 1382 | } |
| 1383 | |
| 1384 | void endpoint_manager_impl::suspend() { |
| 1385 | std::vector<std::weak_ptr<boardnet_endpoint>> weak_endpoints; |
| 1386 | |
| 1387 | { |
| 1388 | std::scoped_lock its_lock{endpoint_mutex_}; |
| 1389 | |
| 1390 | for (const auto& [its_port, protocols] : server_endpoints_) { |
| 1391 | for (const auto& [its_protocol, its_endpoint] : protocols) { |
| 1392 | weak_endpoints.push_back(its_endpoint); |
| 1393 | } |
| 1394 | } |
| 1395 | } |
| 1396 | |
| 1397 | for (const auto& its_weak : weak_endpoints) { |
| 1398 | if (auto its_endpoint = its_weak.lock()) { |
| 1399 | its_endpoint->stop(false); |
| 1400 | } |
| 1401 | } |
| 1402 | } |
| 1403 | |
| 1404 | void endpoint_manager_impl::resume() { |
| 1405 | std::vector<std::tuple<boost::asio::ip::address, uint16_t, bool, partition_id_t>> clients; |
no test coverage detected