Try to stop properly the threads with SIGTERM and SIGINT

This commit is contained in:
Sébastien Lucas
2017-05-30 16:53:50 +02:00
parent 9572b20d41
commit 89418dc802
2 changed files with 29 additions and 10 deletions
+3
View File
@@ -55,6 +55,9 @@ class Mqtt:
t1.start()
self._threads.append(t1)
def disconnect(self):
self._client.disconnect()
def subscribe(self, model="+", name="+", prop="+", command=None):
topic = self.prefix + "/" + model + "/" + name + "/" + prop
if command is not None: