proxywatchd: fix memleak
This commit is contained in:
@@ -216,9 +216,10 @@ class Proxywatchd():
|
|||||||
if self.in_background: self._cleanup()
|
if self.in_background: self._cleanup()
|
||||||
break
|
break
|
||||||
|
|
||||||
if len(self.jobs) == 0:
|
if self.threads[random.choice(xrange(len(self.threads)))].jobcount() == 0:
|
||||||
self.prepare_jobs()
|
self.prepare_jobs()
|
||||||
if len(self.jobs):
|
if len(self.jobs):
|
||||||
|
_log("watchd main: handing out %d jobs"%len(self.jobs))
|
||||||
jpt = len(self.jobs)/config.watchd_threads
|
jpt = len(self.jobs)/config.watchd_threads
|
||||||
if len(self.jobs)/float(config.watchd_threads) - jpt > 0.0: jpt += 1
|
if len(self.jobs)/float(config.watchd_threads) - jpt > 0.0: jpt += 1
|
||||||
for tid in range(config.watchd_threads):
|
for tid in range(config.watchd_threads):
|
||||||
|
|||||||
Reference in New Issue
Block a user