node: make most fields private

This commit is contained in:
Adrien Béraud committed 2017-10-13 01:10:09 +02:00
1 parent 6ce1531e1f
commit e9f007025f
6 files changed
+55 -44

No files matched your search

+1 -1
View File
@@ -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;