From 1adf4f78186bab0c7a7463d35e0ea4fdb6db5ae9 Mon Sep 17 00:00:00 2001 From: Jack Robison Date: Wed, 23 May 2018 17:54:55 -0400 Subject: [PATCH] fix constant used to check if a bucket is fresh --- lbrynet/dht/routingtable.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lbrynet/dht/routingtable.py b/lbrynet/dht/routingtable.py index 5a4db509a..540871bb5 100644 --- a/lbrynet/dht/routingtable.py +++ b/lbrynet/dht/routingtable.py @@ -242,8 +242,9 @@ class TreeRoutingTable(object): """ bucketIndex = startIndex refreshIDs = [] + now = int(self._getTime()) for bucket in self._buckets[startIndex:]: - if force or (int(self._getTime()) - bucket.lastAccessed >= constants.refreshTimeout): + if force or now - bucket.lastAccessed >= constants.checkRefreshInterval: searchID = self._randomIDInBucketRange(bucketIndex) refreshIDs.append(searchID) bucketIndex += 1