zephyr/subsys/net/lib/mqtt
Robert Lubos aec5f0a3ef net: mqtt: Prevent double CONNACK event notification on server reject
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>
2020-07-27 13:24:11 +02:00
..
CMakeLists.txt
Kconfig net: mqtt: Make client "cleansession" flag configurable. 2020-06-09 10:09:04 +03:00
mqtt_decoder.c
mqtt_encoder.c
mqtt_internal.h net: mqtt: Make client "cleansession" flag configurable. 2020-06-09 10:09:04 +03:00
mqtt_os.h
mqtt_rx.c net: mqtt: Prevent double CONNACK event notification on server reject 2020-07-27 13:24:11 +02:00
mqtt_transport_socket_tcp.c
mqtt_transport_socket_tls.c
mqtt_transport_websocket.c
mqtt_transport.c
mqtt_transport.h
mqtt.c net: mqtt: Prevent double CONNACK event notification on server reject 2020-07-27 13:24:11 +02:00