diff options
author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2014-03-31 11:41:14 -0700 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2014-03-31 11:41:14 -0700 |
commit | 8e587ae481631160527fd412d41c5d66439b3fda (patch) | |
tree | f3224d9d99071f884f07d4cf67277860665389aa /node/Topology.cpp | |
parent | acb056e3b1997cbbf95b78787c385b134b924d15 (diff) | |
download | infinitytier-8e587ae481631160527fd412d41c5d66439b3fda.tar.gz infinitytier-8e587ae481631160527fd412d41c5d66439b3fda.zip |
Clean dead paths from peers.
Diffstat (limited to 'node/Topology.cpp')
-rw-r--r-- | node/Topology.cpp | 5 |
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; + } } } |