mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-09-15 23:42:47 +00:00
Currently, the application could receive a duplicate CONNACK event, in case the server rejected the connection at MQTT level (with an error code provided with CONNACK message). A subsequent connection close (with `mqtt_abort` for instance) would produce the duplicate event. Fix this by reporting back to the MQTT engine, that the connection was refused, so it can close the connection rightaway. Rework the event notification logic, so that DISCONNECT event instead of a duplicate CONNACK event is notified in that case. Also, prevent the MQTT engine from notyfing DISCONNECT event in case of socket errors during initial connection phase (i. e. before `mqtt_connect` function finished). Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no> |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
Kconfig | ||
mqtt_decoder.c | ||
mqtt_encoder.c | ||
mqtt_internal.h | ||
mqtt_os.h | ||
mqtt_rx.c | ||
mqtt_transport_socket_tcp.c | ||
mqtt_transport_socket_tls.c | ||
mqtt_transport_websocket.c | ||
mqtt_transport.c | ||
mqtt_transport.h | ||
mqtt.c |