summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/Server/Plugin.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/Server/Plugin.py b/src/lib/Server/Plugin.py
index 3e3616f46..28299d8c7 100644
--- a/src/lib/Server/Plugin.py
+++ b/src/lib/Server/Plugin.py
@@ -289,7 +289,7 @@ class ThreadedStatistics(Statistics,
def run(self):
if not self.load():
return
- while not self.terminate.isSet():
+ while not self.terminate.isSet() and self.work_queue != None:
try:
(xdata, client) = self.work_queue.get(block=True, timeout=2)
except Empty:
@@ -299,7 +299,7 @@ class ThreadedStatistics(Statistics,
self.logger.error("ThreadedStatistics: %s" % e)
continue
self.handle_statistic(xdata, client)
- if not self.work_queue.empty():
+ if self.work_queue != None and not self.work_queue.empty():
self.save()
def process_statistics(self, metadata, data):