mirror of
https://github.com/savoirfairelinux/opendht.git
synced 2026-11-08 04:21:51 +00:00
node: make most fields private
This commit is contained in:
1 parent
6ce1531e1f
commit
e9f007025f
6 files changed
+55
-44
No files matched your search
+1
-1
@@ -95,7 +95,7 @@ NodeCache::NodeMap::getNode(const InfoHash& id, const SockAddr& addr, time_point
|
||||
if (not node) {
|
||||
node = std::make_shared<Node>(id, addr, client);
|
||||
it.first->second = node;
|
||||
} else if (confirm || node->time < now - Node::NODE_EXPIRE_TIME) {
|
||||
} else if (confirm or node->isOld(now)) {
|
||||
node->update(addr);
|
||||
}
|
||||
return node;
|
||||
|
||||
Reference in new issue
Block a user