mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-15 21:58:21 +00:00
The concept of link desperation (escalating to less desirable transports) simplifies a ton of stuff. Loads of spaghetti logic can die since we no longer have to make these decisions down in the core.
This commit is contained in:
@ -251,10 +251,7 @@ void Topology::clean(uint64_t now)
|
||||
for(std::map< Address,SharedPtr<Peer> >::iterator p(_activePeers.begin());p!=_activePeers.end();) {
|
||||
if (((now - p->second->lastUsed()) >= ZT_PEER_IN_MEMORY_EXPIRATION)&&(std::find(_supernodeAddresses.begin(),_supernodeAddresses.end(),p->first) == _supernodeAddresses.end())) {
|
||||
_activePeers.erase(p++);
|
||||
} else {
|
||||
p->second->clean(now);
|
||||
++p;
|
||||
}
|
||||
} else ++p;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user