Skip to content

Commit

Permalink
Add left bytes to request to improve tracker compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
shortcutme committed Feb 10, 2018
1 parent ff8f41c commit 3e51b88
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Site/Site.py
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,7 @@ def announceTracker(self, tracker_protocol, tracker_address, fileserver_port=0,
try:
tracker.connect()
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()
if back:
peers = back["response"]["peers"]
Expand All @@ -849,7 +849,7 @@ def announceTracker(self, tracker_protocol, tracker_address, fileserver_port=0,
params = {
'info_hash': hashlib.sha1(self.address).digest(),
'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'
}
req = None
Expand Down

0 comments on commit 3e51b88

Please sign in to comment.