Merge branch 'bugfix/return_on_qos0_disconnected' into 'master'

bug: Incorrect return on disconnect qos0 publish

See merge request espressif/esp-mqtt!172

(cherry picked from commit fa40f44695fc4a0cde14a31a01b8a03da14dd702)

58c25577 bug: Incorrect return on disconnect qos0 publish
This commit is contained in:
Rocha Euripedes
2023-05-31 19:15:56 +08:00
parent b2bd8e5f49
commit 5bd9724c69

View File

@ -2007,6 +2007,8 @@ int esp_mqtt_client_publish(esp_mqtt_client_handle_t client, const char *topic,
ESP_LOGD(TAG, "Publish: client is not connected");
if (qos > 0) {
ret = pending_msg_id;
} else {
ret = -1;
}
// delete long pending messages