Replace piecemeal designation of upstreams with the concept of moons, which is simpler and easier to use and inherits all the cool live update stuff of worlds (now called planets) and global roots.
This commit is contained in:
parent
b88f573733
commit
64774d0d4f
12 changed files with 242 additions and 296 deletions
|
@ -718,7 +718,7 @@ bool Switch::_trySend(const Packet &packet,bool encrypt)
|
|||
* go somewhere. */
|
||||
|
||||
SharedPtr<Path> viaPath(peer->getBestPath(now,false));
|
||||
if ( (viaPath) && (!viaPath->alive(now)) && (!RR->topology->isRoot(peer->identity())) ) {
|
||||
if ( (viaPath) && (!viaPath->alive(now)) && (!RR->topology->isUpstream(peer->identity())) ) {
|
||||
if ((now - viaPath->lastOut()) > std::max((now - viaPath->lastIn()) * 4,(uint64_t)ZT_PATH_MIN_REACTIVATE_INTERVAL))
|
||||
peer->attemptToContactAt(viaPath->localAddress(),viaPath->address(),now);
|
||||
viaPath.zero();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue