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 | |
parent | setuid fix (diff) | |
download | pyload-5db3d51a0e5e938b76462f3f6063fd67fa2bd10c.tar.xz |
curl gobal init
-rw-r--r-- | module/ThreadManager.py | 8 | ||||
-rwxr-xr-x | pyLoadCore.py | 1 |
2 files changed, 8 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() diff --git a/pyLoadCore.py b/pyLoadCore.py index e0322975e..2f9f7783b 100755 --- a/pyLoadCore.py +++ b/pyLoadCore.py @@ -477,6 +477,7 @@ class Core(object): finally: self.files.syncSave() + self.threadManager.cleanup() self.shuttedDown = True |