cancel
Showing results for 
Search instead for 
Did you mean: 

Using the B-L462E cellular board with Azure NetX MQTT code to connect to, publish and subscribe topics on my own mosquitto server. How can I reconnect to MQTT after the server restarts?

JVand.12
Associate II

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.

0 REPLIES 0