timherreijgers / Domotics-base

Project containing base code for domotics projects
MIT License
0 stars 0 forks source link

Make the MQTT middleware reconnected automatically on disconnect #46

Open timherreijgers opened 1 year ago

timherreijgers commented 1 year ago

This could be done by implementing the weak version of mqttDisconnected as follows:

__attribute__((weak)) void mqttDisconnected(Mqtt * mqtt)
{
    mqtt->reconnectToLastIp();
}