Clean dead paths from peers.
This commit is contained in:
parent
acb056e3b1
commit
8e587ae481
5 changed files with 41 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue