mirror of
https://github.com/espressif/esp-mqtt.git
synced 2025-07-31 19:25:14 +02:00
Merge branch 'bugfix/missed_mutex_unlock' into 'master'
Fixed missing mutex unlock if subscribe message fails to be created See merge request espressif/esp-mqtt!58
This commit is contained in:
@@ -93,7 +93,7 @@ build_and_test_qemu:
|
||||
script:
|
||||
- cit_add_ssh_key "${GITLAB_KEY}"
|
||||
- git clone "${IDF_REPO}"
|
||||
- $MQTT_PATH/ci/set_idf.sh master
|
||||
- $MQTT_PATH/ci/set_idf.sh release/v4.1
|
||||
- cd $IDF_PATH && tools/idf_tools.py --non-interactive install && eval "$(tools/idf_tools.py --non-interactive export)"
|
||||
- $MQTT_PATH/ci/set_mqtt.sh $CI_COMMIT_SHA
|
||||
# build publish stress test
|
||||
|
@@ -1460,6 +1460,7 @@ int esp_mqtt_client_subscribe(esp_mqtt_client_handle_t client, const char *topic
|
||||
&client->mqtt_state.pending_msg_id);
|
||||
if (client->mqtt_state.outbound_message->length == 0) {
|
||||
ESP_LOGE(TAG, "Subscribe message cannot be created");
|
||||
MQTT_API_UNLOCK(client);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -1491,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