From 8a95b5b5b0012cea0b3472f9885375463ce4d7c9 Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Mon, 10 Oct 2016 08:30:33 -0400 Subject: [PATCH] tabify --- Datagram.cpp | 6 +++--- Datagram.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Datagram.cpp b/Datagram.cpp index 0fce1166..d0b0737a 100644 --- a/Datagram.cpp +++ b/Datagram.cpp @@ -276,9 +276,9 @@ namespace datagram auto now = i2p::util::GetMillisecondsSinceEpoch (); // we need to rotate paths becuase the routing path is too old // if (now - m_LastPathChange >= DATAGRAM_SESSION_PATH_SWITCH_INTERVAL) return true; - // too fast switching paths - if (now - m_LastPathChange < DATAGRAM_SESSION_PATH_MIN_LIFETIME ) return false; - // our path looks dead so we need to rotate paths + // too fast switching paths + if (now - m_LastPathChange < DATAGRAM_SESSION_PATH_MIN_LIFETIME ) return false; + // our path looks dead so we need to rotate paths if (now - m_LastSuccess >= DATAGRAM_SESSION_PATH_TIMEOUT) return !dead; // if we have a routing session and routing path we don't need to switch paths return dead; diff --git a/Datagram.h b/Datagram.h index 614a4734..dc63cccb 100644 --- a/Datagram.h +++ b/Datagram.h @@ -29,8 +29,8 @@ namespace datagram const uint64_t DATAGRAM_SESSION_LEASE_HANDOVER_WINDOW = 10 * 1000; // milliseconds fudge factor for leases handover const uint64_t DATAGRAM_SESSION_LEASE_HANDOVER_FUDGE = 1000; - // milliseconds minimum time between path switches - const uint64_t DATAGRAM_SESSION_PATH_MIN_LIFETIME = 5 * 1000; + // milliseconds minimum time between path switches + const uint64_t DATAGRAM_SESSION_PATH_MIN_LIFETIME = 5 * 1000; class DatagramSession {