proxy server: use shared_ptr for stats, remove statsMutex_

This commit is contained in:
Adrien Béraud committed 2020-01-15 13:54:24 -05:00
1 parent 3ba43c80a2
commit 5b15fdeeef
3 files changed
+43 -38

No files matched your search

+5 -2
View File
@@ -152,8 +152,11 @@ void cmd_loop(std::shared_ptr<DhtRunner>& node, dht_params& params
std::cout << nodeInfo.ipv6.toString() << std::endl;
#ifdef OPENDHT_PROXY_SERVER
for (const auto& proxy : proxies) {
std::cout << "Stats for proxy on port " << proxy.first << std::endl;
std::cout << " " << proxy.second->stats().toString() << std::endl;
std::cout << "Stats for proxy server on port " << proxy.first << std::endl;
if (auto stats = proxy.second->stats())
std::cout << " " << stats->toString() << std::endl;
else
std::cout << " (stats not available yet)" << std::endl;
}
#endif
continue;