More graceful CallbackServer shutdown

This commit is contained in:
Anders Ingemann 2014-11-25 20:43:23 +01:00
parent d88d73c7f1
commit f8d79f06e3

View file

@ -20,5 +20,7 @@ class CallbackServer(object):
self.thread.start()
def stop(self):
self.daemon.shutdown()
self.thread.join()
if hasattr(self, 'daemon'):
self.daemon.shutdown()
if hasattr(self, 'thread'):
self.thread.join()