summaryrefslogtreecommitdiff
path: root/node/Peer.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'node/Peer.hpp')
-rw-r--r--node/Peer.hpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/node/Peer.hpp b/node/Peer.hpp
index 8286bfff..25ef72b7 100644
--- a/node/Peer.hpp
+++ b/node/Peer.hpp
@@ -164,7 +164,7 @@ public:
*
* @param now Current time
* @param inetAddressFamily Keep this address family alive, or -1 for any
- * @return True if we have at least one direct path
+ * @return True if we have at least one direct path of the given family (or any if family is -1)
*/
bool doPingAndKeepalive(uint64_t now,int inetAddressFamily);
@@ -367,7 +367,7 @@ private:
inline uint64_t _pathScore(const unsigned int p) const
{
- return ( _paths[p].path->lastIn() +
+ return ( _paths[p].lastReceive +
(uint64_t)(_paths[p].path->preferenceRank() * (ZT_PEER_PING_PERIOD / ZT_PATH_MAX_PREFERENCE_RANK)) +
(uint64_t)(_paths[p].clusterWeights * ZT_PEER_PING_PERIOD) );
}