If the connection in loop_start() does not complete before loop_stop()
is called the network thread never ends.
Thanks to Kees Bakker.
Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=448428
Change-Id: If44b313cd0e642b4bf98182d8e50c4da6a8d975c
+v1.0.3 - 2014-11-XX
+===================
+
+- Fix possible race condition if the connection in loop_start() does not
+ complete before loop_stop() is called, meaning the network thread never
+ ends. Closes #448428. Thanks to Kees Bakker.
+
v1.0.2 - 2014-09-13
===================
if self._thread is not None:
return MQTT_ERR_INVAL
+ self._thread_terminate = False
self._thread = threading.Thread(target=self._thread_main)
self._thread.daemon = True
self._thread.start()
self._callback_mutex.release()
def _thread_main(self):
- run = True
- self._thread_terminate = False
self._state_mutex.acquire()
if self._state == mqtt_cs_connect_async:
self._state_mutex.release()