-
My goal is:
Be able to force a MQTT reconnection while on a JS firmware. -
My actions are:
Even when MQTT auto-reconnect is enabled, I can detect detect situations where it does not work, usually after several days of uptime. -
The result I see is:
When the anomaly occurs, " MQTT.isConnected(); " returns “false”. But Mongoose OS does not reconnect to the MQTT broker.
On our broker logs, there is no attempt whatsoever from the device to reconnect. -
My expectation & question is:
Either have the MQTT automatically detect this and reconnect, or to use a workaround.
By the way, what is the proper syntax to call the pertinent reconnect C functions over JS / FFI (below)?
bool mgos_mqtt_global_connect(void);
void mgos_mqtt_global_disconnect(void);
I believe I could try these as a possible workaround.
Thank you!