From 3e4f91ae50319bf240c08269d9729a20f7a164af Mon Sep 17 00:00:00 2001 From: David Cermak Date: Mon, 10 Feb 2020 07:58:36 +0100 Subject: [PATCH] Client: unlock if unsubscribe message fails to be created In a similar way as for the subscribe message --- mqtt_client.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mqtt_client.c b/mqtt_client.c index f2f8de0..fba72e3 100644 --- a/mqtt_client.c +++ b/mqtt_client.c @@ -1492,6 +1492,7 @@ int esp_mqtt_client_unsubscribe(esp_mqtt_client_handle_t client, const char *top topic, &client->mqtt_state.pending_msg_id); if (client->mqtt_state.outbound_message->length == 0) { + MQTT_API_UNLOCK(client); ESP_LOGE(TAG, "Unubscribe message cannot be created"); return -1; }