Add left bytes to request to improve tracker compatibility
This commit is contained in:
parent
ff8f41c1eb
commit
3e51b888cb
1 changed files with 2 additions and 2 deletions
|
@ -835,7 +835,7 @@ class Site(object):
|
||||||
try:
|
try:
|
||||||
tracker.connect()
|
tracker.connect()
|
||||||
tracker.poll_once()
|
tracker.poll_once()
|
||||||
tracker.announce(info_hash=hashlib.sha1(self.address).hexdigest(), num_want=50)
|
tracker.announce(info_hash=hashlib.sha1(self.address).hexdigest(), num_want=num_want, left=431102370)
|
||||||
back = tracker.poll_once()
|
back = tracker.poll_once()
|
||||||
if back:
|
if back:
|
||||||
peers = back["response"]["peers"]
|
peers = back["response"]["peers"]
|
||||||
|
@ -849,7 +849,7 @@ class Site(object):
|
||||||
params = {
|
params = {
|
||||||
'info_hash': hashlib.sha1(self.address).digest(),
|
'info_hash': hashlib.sha1(self.address).digest(),
|
||||||
'peer_id': my_peer_id, 'port': fileserver_port,
|
'peer_id': my_peer_id, 'port': fileserver_port,
|
||||||
'uploaded': 0, 'downloaded': 0, 'left': 0, 'compact': 1, 'numwant': 30,
|
'uploaded': 0, 'downloaded': 0, 'left': 431102370, 'compact': 1, 'numwant': num_want,
|
||||||
'event': 'started'
|
'event': 'started'
|
||||||
}
|
}
|
||||||
req = None
|
req = None
|
||||||
|
|
Loading…
Reference in a new issue