mirror of
https://github.com/ZeroTier/ZeroTierOne
synced 2025-07-14 17:13:15 -07:00
Always ping / contact network preferred relays (if any).
This commit is contained in:
parent
229195166a
commit
5bc89034bc
3 changed files with 37 additions and 5 deletions
|
@ -191,7 +191,7 @@ void Peer::attemptToContactAt(const RuntimeEnvironment *RR,const InetAddress &at
|
|||
RR->node->putPacket(atAddress,outp.data(),outp.size());
|
||||
}
|
||||
|
||||
void Peer::doPingAndKeepalive(const RuntimeEnvironment *RR,uint64_t now)
|
||||
bool Peer::doPingAndKeepalive(const RuntimeEnvironment *RR,uint64_t now)
|
||||
{
|
||||
Path *const bestPath = getBestPath(now);
|
||||
if ((bestPath)&&(bestPath->active(now))) {
|
||||
|
@ -204,7 +204,9 @@ void Peer::doPingAndKeepalive(const RuntimeEnvironment *RR,uint64_t now)
|
|||
RR->node->putPacket(bestPath->address(),"",0);
|
||||
bestPath->sent(now);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void Peer::addPath(const Path &newp)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue