Commit 28863699 authored by Matthias Klein's avatar Matthias Klein

Fix MQTTAsync_waitForCompletion(): missing MQTTAsync_unlock_mutex() call

Signed-off-by: 's avatarMatthias Klein <matthias.klein@linux.com>
parent e8d34da2
...@@ -3122,11 +3122,13 @@ int MQTTAsync_waitForCompletion(MQTTAsync handle, MQTTAsync_token dt, unsigned l ...@@ -3122,11 +3122,13 @@ int MQTTAsync_waitForCompletion(MQTTAsync handle, MQTTAsync_token dt, unsigned l
if (m == NULL || m->c == NULL) if (m == NULL || m->c == NULL)
{ {
MQTTAsync_unlock_mutex(mqttasync_mutex);
rc = MQTTASYNC_FAILURE; rc = MQTTASYNC_FAILURE;
goto exit; goto exit;
} }
if (m->c->connected == 0) if (m->c->connected == 0)
{ {
MQTTAsync_unlock_mutex(mqttasync_mutex);
rc = MQTTASYNC_DISCONNECTED; rc = MQTTASYNC_DISCONNECTED;
goto exit; goto exit;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment