Skip to content

Commit

Permalink
The downloadThread is saved to avoid GC
Browse files Browse the repository at this point in the history
  • Loading branch information
Luca Ferrari committed May 28, 2012
1 parent fe78594 commit 540b288
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bittorrent/teamGML/threads/request_emitter.py
Expand Up @@ -18,6 +18,7 @@ def __init__(self, local_port):
self.local_port = local_port
self.ui_handler = None
self.download_queues = []
self.download_threads = []


def login(self, tracker_ip, tracker_port = 80):
Expand Down Expand Up @@ -101,6 +102,7 @@ def download_part(self, peer_ip, peer_port, file_id, file_part):
f = FilesManager.find_file_by_id(file_id)
dlThread = DownloadThread(downloadSocket, f.filename, f.id, file_part, peer_ip, self, self.ui_handler)
dlThread.start()
self.download_threads.append(dlThread)

def register_part_to_tracker(self, file, part_num):
my_tracker = UsersManager.get_tracker()
Expand Down

0 comments on commit 540b288

Please sign in to comment.