mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-07 03:56:57 +03:00
Improve MQTT connection handling (#1462)
* modify mqtt init at startup + after disconnection * mqtt_init only when not initialized * Minor udapte * Apply suggestions from code review Co-authored-by: CaCO3 <caco3@ruinelli.ch> * Correct typo Co-authored-by: CaCO3 <caco3@ruinelli.ch>
This commit is contained in:
@@ -203,9 +203,8 @@ bool ClassFlowMQTT::Start(float AutoIntervall) {
|
||||
keepAlive, SetRetainFlag, (void *)&GotConnected);
|
||||
|
||||
if (!MQTT_Init()) {
|
||||
if (!MQTT_Init()) { // Retry
|
||||
return false;
|
||||
}
|
||||
LogFile.WriteToFile(ESP_LOG_ERROR, TAG, "Init at startup failed! Retry with next publish call");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user