pull/493/merge
Daniel Ahern 2 months ago committed by GitHub
commit d2c68d92e7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -415,7 +415,24 @@ class Server:
return False
module_infos = get_remote_module_infos(self.dht, self.module_uids, latest=True)
return block_selection.should_choose_other_blocks(self.dht.peer_id, module_infos, self.balance_quality)
should_choose = block_selection.should_choose_other_blocks(self.dht.peer_id, module_infos, self.balance_quality)
if False == should_choose:
return False
else:
for i in range(2):
wait_time = 90 + random.randint(-30, 10)
time.sleep(wait_time)
module_infos = get_remote_module_infos(self.dht, self.module_uids, latest=True)
logger.info('--retrying should_choose_other_blocks')
should_choose = block_selection.should_choose_other_blocks(self.dht.peer_id, module_infos, self.balance_quality)
if False == should_choose:
return False
return should_choose
def shutdown(self, timeout: Optional[float] = 5):
self.stop.set()

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save