fix: Move buffer initialization to set config

When calling set config message buffers were not affected because the
creation was handled on init.

Closes https://github.com/espressif/esp-mqtt/issues/267
This commit is contained in:
Euripedes Rocha
2023-10-25 07:47:05 +00:00
committed by Rocha Euripedes
parent abd8b6cadc
commit ea0df31e00
4 changed files with 30 additions and 22 deletions
+3
View File
@@ -597,6 +597,9 @@ esp_err_t esp_mqtt_client_destroy(esp_mqtt_client_handle_t client);
* @brief Set configuration structure, typically used when updating the config
* (i.e. on "before_connect" event
*
* Notes:
* - When calling this function make sure to have all the intendend configurations
* set, otherwise default values are set.
* @param client *MQTT* client handle
*
* @param config *MQTT* configuration structure