diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2009-06-03 17:00:19 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2009-06-03 17:00:19 +0200 |
commit | 917c616fd1d00e9a59f58e513dbcb3309f401df4 (patch) | |
tree | 74de9a6901902d2ea4f48592cf18a61d2d47ee76 /module/download_thread.py | |
parent | changed reconnect method, still not working 100% correct (diff) | |
download | pyload-917c616fd1d00e9a59f58e513dbcb3309f401df4.tar.xz |
reconnect working statisfactory, removed all debug functions
Diffstat (limited to 'module/download_thread.py')
-rw-r--r-- | module/download_thread.py | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/module/download_thread.py b/module/download_thread.py index 62ac633ee..d5e4f4edc 100644 --- a/module/download_thread.py +++ b/module/download_thread.py @@ -98,31 +98,13 @@ class Download_Thread(threading.Thread): pyfile.prepareDownload() print "dl prepared", status.filename - rnd = random.randint(0,1) - if rnd == 0: - print status.filename, "want reconnect" - status.want_reconnect = True - status.waituntil = time() + 60 - else: - status.waituntil = 0 - status.want_reconnect = False - print status.filename, "doesnt want reconnect" - - if not status.exists: raise "FileDontExists" #i know its deprecated, who cares^^ - - if status.want_reconnect: - reconnect = self.parent.init_reconnect() - if reconnect: - status.type = "reconnected" - status.want_reconnect = False - return False - + status.type = "waiting" while (time() < status.waituntil): - if status.want_reconnect and self.parent.reconnecting: + if self.parent.init_reconnect(pyfile) or self.parent.reconnecting: status.type = "reconnected" status.want_reconnect = False return False |