diff options
author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2014-02-03 21:15:29 -0800 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2014-02-03 21:15:29 -0800 |
commit | d452ed7db8b0118c223c6f85bc4eaf9d091adaae (patch) | |
tree | 926d8a5007fa510270514fdaf10ef2707938dbfd | |
parent | 8f5cd0a36155f619c9038a0eac78d002c4eb3c4f (diff) | |
download | infinitytier-d452ed7db8b0118c223c6f85bc4eaf9d091adaae.tar.gz infinitytier-d452ed7db8b0118c223c6f85bc4eaf9d091adaae.zip |
Fix inverted sense bug in new skip-stale-relay logic.
-rw-r--r-- | node/Topology.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/node/Topology.cpp b/node/Topology.cpp index 516b0e31..a7285d33 100644 --- a/node/Topology.cpp +++ b/node/Topology.cpp @@ -154,7 +154,7 @@ SharedPtr<Peer> 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; } |