Request less peers in update mode
This commit is contained in:
parent
c6fd61ddf3
commit
ff8f41c1eb
1 changed files with 5 additions and 0 deletions
|
@ -818,6 +818,11 @@ class Site(object):
|
||||||
# Return: Complete time or False on error
|
# Return: Complete time or False on error
|
||||||
def announceTracker(self, tracker_protocol, tracker_address, fileserver_port=0, add_types=[], my_peer_id="", mode="start"):
|
def announceTracker(self, tracker_protocol, tracker_address, fileserver_port=0, add_types=[], my_peer_id="", mode="start"):
|
||||||
s = time.time()
|
s = time.time()
|
||||||
|
if mode == "update":
|
||||||
|
num_want = 10
|
||||||
|
else:
|
||||||
|
num_want = 30
|
||||||
|
|
||||||
if "ip4" not in add_types:
|
if "ip4" not in add_types:
|
||||||
fileserver_port = 0
|
fileserver_port = 0
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue