diff options
| author | Joseph Henry <josephjah@gmail.com> | 2018-05-01 16:32:15 -0700 |
|---|---|---|
| committer | Joseph Henry <josephjah@gmail.com> | 2018-05-01 16:32:15 -0700 |
| commit | 6a2ba4baca326272c45930208b70cfedf8cb1638 (patch) | |
| tree | 434403aecca63908909678bd234ef8b4ffb1d1e4 /node/Switch.cpp | |
| parent | 836d897aecc193ec3477e67858237a3f97819024 (diff) | |
| download | infinitytier-6a2ba4baca326272c45930208b70cfedf8cb1638.tar.gz infinitytier-6a2ba4baca326272c45930208b70cfedf8cb1638.zip | |
Introduced basic multipath support
Diffstat (limited to 'node/Switch.cpp')
| -rw-r--r-- | node/Switch.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/node/Switch.cpp b/node/Switch.cpp index eb1ebadb..3f6c4e41 100644 --- a/node/Switch.cpp +++ b/node/Switch.cpp @@ -646,12 +646,12 @@ bool Switch::_trySend(void *tPtr,Packet &packet,bool encrypt) const SharedPtr<Peer> peer(RR->topology->getPeer(tPtr,destination)); if (peer) { - viaPath = peer->getBestPath(now,false); + viaPath = peer->getAppropriatePath(now,false); if (!viaPath) { peer->tryMemorizedPath(tPtr,now); // periodically attempt memorized or statically defined paths, if any are known const SharedPtr<Peer> relay(RR->topology->getUpstreamPeer()); - if ( (!relay) || (!(viaPath = relay->getBestPath(now,false))) ) { - if (!(viaPath = peer->getBestPath(now,true))) + if ( (!relay) || (!(viaPath = relay->getAppropriatePath(now,false))) ) { + if (!(viaPath = peer->getAppropriatePath(now,true))) return false; } } |
