forked from LBRYCommunity/lbry-sdk
fix constant used to check if a bucket is fresh
This commit is contained in:
parent
05241012a2
commit
1adf4f7818
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue