summaryrefslogtreecommitdiff
path: root/sleekxmpp/xmlstream/scheduler.py
diff options
context:
space:
mode:
Diffstat (limited to 'sleekxmpp/xmlstream/scheduler.py')
-rw-r--r--sleekxmpp/xmlstream/scheduler.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/sleekxmpp/xmlstream/scheduler.py b/sleekxmpp/xmlstream/scheduler.py
index b932b0a7..b1b81439 100644
--- a/sleekxmpp/xmlstream/scheduler.py
+++ b/sleekxmpp/xmlstream/scheduler.py
@@ -137,7 +137,7 @@ class Scheduler(object):
"""Process scheduled tasks."""
self.run = True
try:
- while self.run:
+ while self.run and (self.parentstop is None or not self.parentstop.isSet()):
wait = 1
updated = False
if self.schedule:
@@ -168,6 +168,7 @@ class Scheduler(object):
except KeyboardInterrupt:
self.run = False
if self.parentstop is not None:
+ logging.debug("stopping parent")
self.parentstop.set()
except SystemExit:
self.run = False