mirror of
https://github.com/espressif/esp-mqtt.git
synced 2025-07-29 18:28:24 +02:00
Client: unlock if unsubscribe message fails to be created
In a similar way as for the subscribe message
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user