diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-09-22 16:14:21 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-09-22 16:14:21 +0200 |
commit | 5db3d51a0e5e938b76462f3f6063fd67fa2bd10c (patch) | |
tree | 43a4d3d201f34a4daef0a7cd8fb987af202d0093 /module/ThreadManager.py | |
parent | setuid fix (diff) | |
download | pyload-5db3d51a0e5e938b76462f3f6063fd67fa2bd10c.tar.xz |
curl gobal init
Diffstat (limited to 'module/ThreadManager.py')
-rw-r--r-- | module/ThreadManager.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/module/ThreadManager.py b/module/ThreadManager.py index 9aa3368c0..365efa764 100644 --- a/module/ThreadManager.py +++ b/module/ThreadManager.py @@ -24,6 +24,7 @@ from subprocess import Popen from threading import Event from time import sleep from traceback import print_exc +import pycurl import PluginThread from module.network.Request import getURL @@ -48,6 +49,8 @@ class ThreadManager: self.reconnecting = Event() self.reconnecting.clear() + pycurl.global_init(pycurl.GLOBAL_DEFAULT) + for i in range(0, self.core.config.get("general", "max_downloads")): self.createThread() @@ -193,4 +196,7 @@ class ThreadManager: else: thread = PluginThread.DecrypterThread(self, job) - + + def cleanup(self): + """do global cleanup""" + pycurl.global_cleanup() |