summaryrefslogtreecommitdiff
path: root/node/Topology.cpp
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2014-03-31 11:41:14 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2014-03-31 11:41:14 -0700
commit8e587ae481631160527fd412d41c5d66439b3fda (patch)
treef3224d9d99071f884f07d4cf67277860665389aa /node/Topology.cpp
parentacb056e3b1997cbbf95b78787c385b134b924d15 (diff)
downloadinfinitytier-8e587ae481631160527fd412d41c5d66439b3fda.tar.gz
infinitytier-8e587ae481631160527fd412d41c5d66439b3fda.zip
Clean dead paths from peers.
Diffstat (limited to 'node/Topology.cpp')
-rw-r--r--node/Topology.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/node/Topology.cpp b/node/Topology.cpp
index 75784849..6390a338 100644
--- a/node/Topology.cpp
+++ b/node/Topology.cpp
@@ -210,7 +210,10 @@ void Topology::clean()
for(std::map< Address,SharedPtr<Peer> >::iterator p(_activePeers.begin());p!=_activePeers.end();) {
if (((now - p->second->lastUsed()) >= ZT_PEER_IN_MEMORY_EXPIRATION)&&(!_supernodeAddresses.count(p->second->address())))
_activePeers.erase(p++);
- else ++p;
+ else {
+ p->second->clean(now);
+ ++p;
+ }
}
}