fix constant used to check if a bucket is fresh

This commit is contained in:
Jack Robison 2018-05-23 17:54:55 -04:00
parent 05241012a2
commit 1adf4f7818
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2

View file

@ -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