2023-05-19 05:15 PM
Code is attached. When the mosquitto server is shut down, the code loops, failing to connect via this call nxd_mqtt_client_login_set(&mqtt_client,MQTTNAME, STRLEN(MQTTNAME),MQTTPASS, STRLEN(MQTTPASS)). After failing, nxd_mqtt_client_disconnect(&mqtt_client); and nxd_mqtt_client_delete(&mqtt_client); are executed. I expect the client to disconnect the old socket and reconnect with a new socket but it does not work. The board/app must be reset/rebooted to again connect.