forked from LBRYCommunity/lbry-sdk
let find value run until it finds a value
This commit is contained in:
parent
2b0d4c1603
commit
56613a71d5
1 changed files with 3 additions and 0 deletions
|
@ -134,6 +134,9 @@ class _IterativeFind(object):
|
|||
defer.returnValue(contact.id)
|
||||
|
||||
def should_stop(self):
|
||||
if self.is_find_value_request:
|
||||
# search stops when it finds a value, let it run
|
||||
return False
|
||||
if self.prev_closest_node and self.closest_node and self.distance.is_closer(self.prev_closest_node.id,
|
||||
self.closest_node.id):
|
||||
# we're getting further away
|
||||
|
|
Loading…
Reference in a new issue