Skip to content

Commit

Permalink
Add some delay on pex error before try the next peer
Browse files Browse the repository at this point in the history
  • Loading branch information
shortcutme committed Aug 8, 2019
1 parent 3696db8 commit bf10cde
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Site/SiteAnnouncer.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,8 @@ def announcePex(self, query_num=2, need_num=5):
if num_added:
self.site.worker_manager.onPeers()
self.site.updateWebsocket(peers_added=num_added)
else:
time.sleep(0.1)
if done == query_num:
break
self.site.log.debug("Pex result: from %s peers got %s new peers." % (done, total_added))
Expand Down

0 comments on commit bf10cde

Please sign in to comment.