diff options
author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-11-02 15:15:20 -0800 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-11-02 15:15:20 -0800 |
commit | 60ce886605c0298fc22dbce48beb106a96bd35e2 (patch) | |
tree | 4c8f1af9926765c3c8bd3f4ffa0d6d42fb9bbd04 /node/Node.cpp | |
parent | ab27a91b07278146975087e873577bed43793554 (diff) | |
download | infinitytier-60ce886605c0298fc22dbce48beb106a96bd35e2.tar.gz infinitytier-60ce886605c0298fc22dbce48beb106a96bd35e2.zip |
Tweak some timings for better reliability.
Diffstat (limited to 'node/Node.cpp')
-rw-r--r-- | node/Node.cpp | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/node/Node.cpp b/node/Node.cpp index 42180e99..74acc869 100644 --- a/node/Node.cpp +++ b/node/Node.cpp @@ -305,18 +305,7 @@ ZT_ResultCode Node::processBackgroundTasks(uint64_t now,volatile uint64_t *nextB for(std::vector< SharedPtr<Network> >::const_iterator n(needConfig.begin());n!=needConfig.end();++n) (*n)->requestConfiguration(); - // Attempt to contact network preferred relays that we don't have direct links to - std::sort(networkRelays.begin(),networkRelays.end()); - networkRelays.erase(std::unique(networkRelays.begin(),networkRelays.end()),networkRelays.end()); - for(std::vector< std::pair<Address,InetAddress> >::const_iterator nr(networkRelays.begin());nr!=networkRelays.end();++nr) { - if (nr->second) { - SharedPtr<Peer> rp(RR->topology->getPeer(nr->first)); - if ((rp)&&(!rp->hasActiveDirectPath(now))) - rp->attemptToContactAt(RR,InetAddress(),nr->second,now); - } - } - - // Ping living or root server/relay peers + // Do pings and keepalives _PingPeersThatNeedPing pfunc(RR,now,networkRelays); RR->topology->eachPeer<_PingPeersThatNeedPing &>(pfunc); |