Give 10 second timeout for reannounce
This commit is contained in:
parent
f05c7ffbfa
commit
8c76e258d7
1 changed files with 8 additions and 0 deletions
|
@ -330,6 +330,14 @@ class FileServer(ConnectionServer):
|
|||
startup = False
|
||||
time.sleep(60 * 20)
|
||||
|
||||
def announceSite(self, site):
|
||||
site.announce(mode="update", pex=False)
|
||||
active_site = time.time() - site.settings.get("modified", 0) < 24 * 60 * 60
|
||||
if site.settings["own"] or active_site: # Check connections more frequently on own and active sites to speed-up first connections
|
||||
site.needConnections(check_site_on_reconnect=True)
|
||||
site.sendMyHashfield(3)
|
||||
site.updateHashfield(3)
|
||||
|
||||
# Announce sites every 20 min
|
||||
def announceSites(self):
|
||||
time.sleep(5 * 60) # Sites already announced on startup
|
||||
|
|
Loading…
Reference in a new issue