From 4c455876f92c629b015cbfc6d904dc8c2d12eca2 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Tue, 19 Apr 2016 09:22:51 -0700 Subject: Revise peer path weighting to always prioritize cluster-optimal paths. --- node/Peer.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'node/Peer.cpp') diff --git a/node/Peer.cpp b/node/Peer.cpp index 6c935e0a..ce4401cd 100644 --- a/node/Peer.cpp +++ b/node/Peer.cpp @@ -144,14 +144,17 @@ void Peer::received( if (np < ZT_MAX_PEER_NETWORK_PATHS) { slot = &(_paths[np++]); } else { - uint64_t slotLRmin = 0xffffffffffffffffULL; + uint64_t slotWorstScore = 0xffffffffffffffffULL; for(unsigned int p=0;p