Skip to content
Snippets Groups Projects
Commit 333087bc authored by Adrien Béraud's avatar Adrien Béraud
Browse files

dhtrunner: fix getNodeInfo using proxy client

parent 5b87090c
No related branches found
No related tags found
No related merge requests found
...@@ -465,12 +465,14 @@ DhtRunner::getNodesStats(sa_family_t af) const ...@@ -465,12 +465,14 @@ DhtRunner::getNodesStats(sa_family_t af) const
NodeInfo NodeInfo
DhtRunner::getNodeInfo() const { DhtRunner::getNodeInfo() const {
std::lock_guard<std::mutex> lck(dht_mtx); std::lock_guard<std::mutex> lck(dht_mtx);
NodeInfo info; NodeInfo info {};
info.id = getId(); if (auto dht = activeDht()) {
info.node_id = getNodeId(); info.id = dht->getId();
info.node_id = dht->getNodeId();
info.ipv4 = dht->getNodesStats(AF_INET);
info.ipv6 = dht->getNodesStats(AF_INET6);
}
info.ongoing_ops = ongoing_ops; info.ongoing_ops = ongoing_ops;
info.ipv4 = dht_->getNodesStats(AF_INET);
info.ipv6 = dht_->getNodesStats(AF_INET6);
return info; return info;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment