- Fixed message type check: Previously, it checked for PUBREL, but the
enqueued packet is the PUBLISH packet, hence check for this type in
is_valid_mqtt_msg().
- Moved mqtt_enqueue after the preparation of the packet, so that the
correct message id gets stored (also relevant for QoS1).
* Adding disconnection if no pingresp
* Initializing wait_for_ping_resp to false
* Setting wait_for_ping_resp to false if aborting connection or when sending connect
* Remove unused code: the state here is always MQTT_STATE_CONNECTED.
Under the assumption that only the esp_mqtt_task can change the client state
(otherwise we are missing a lock around the state usage everywhere).
* Change the return type of esp_mqtt_client_ping from int to esp_err_t.
* Abort the MQTT connection if we can't send ping.
Try to handle the situation when the underlying connection changes and the
sockets have wrong status (see esp-idf/docs/api-guides/wifi.rst).
* add missing config for setting default port for SSL in Kconfig
* free the TCP only after closing the connection , not before
* set the config in the client before we access the schema in the client
* fix typo
* dispatch also Publish event