Rev536, Fix stats page, Support ranged http requests for better video browser compatibility, setHashfield command, One by one send hashfield to connected peers if changed, Keep count hashfield changetime, PeerHashfield optimalizations, Wait for peers on checkmodification, Give more time to query trackers, Do not count udp trackers as error if udp disabled, Test hashfield push

This commit is contained in:
HelloZeroNet 2015-10-30 02:08:02 +01:00
parent 9c5fda6ed2
commit 8e710beab1
9 changed files with 171 additions and 40 deletions

View file

@ -172,7 +172,7 @@ class FileServer(ConnectionServer):
import gc
first_announce = True # First start
while 1:
# Sites healthcare
# Sites healthcare every 20 min
if config.trackers_file:
config.loadTrackersFile()
for address, site in self.sites.items():
@ -196,6 +196,9 @@ class FileServer(ConnectionServer):
if self.port_opened is False:
site.needConnections()
if first_announce: # Send my optional files to peers
site.sendMyHashfield()
time.sleep(2) # Prevent too quick request
site = None
@ -208,6 +211,7 @@ class FileServer(ConnectionServer):
config.loadTrackersFile()
for address, site in self.sites.items():
site.announce(num=1, pex=False)
site.sendMyHashfield(num_send=1)
time.sleep(2)
first_announce = False