From d452ed7db8b0118c223c6f85bc4eaf9d091adaae Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Mon, 3 Feb 2014 21:15:29 -0800 Subject: [PATCH] Fix inverted sense bug in new skip-stale-relay logic. --- node/Topology.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/node/Topology.cpp b/node/Topology.cpp index 516b0e317..a7285d334 100644 --- a/node/Topology.cpp +++ b/node/Topology.cpp @@ -154,7 +154,7 @@ SharedPtr Topology::getBestSupernode(const Address *avoid,unsigned int avo // Skip possibly comatose or unreachable relays uint64_t lds = (*sn)->lastDirectSend(); uint64_t ldr = (*sn)->lastDirectReceive(); - if ((lds)&&(ldr > lds)&&((lds - ldr) > ZT_PEER_RELAY_CONVERSATION_LATENCY_THRESHOLD)) { + if ((lds)&&(lds > ldr)&&((lds - ldr) > ZT_PEER_RELAY_CONVERSATION_LATENCY_THRESHOLD)) { ++sn; continue; }