mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-08 12:36:52 +03:00
.
This commit is contained in:
@@ -173,6 +173,11 @@ bool MQTT_Init() {
|
|||||||
LogFile.WriteToFile(ESP_LOG_ERROR, "MQTT - Could not register event (ret=" + std::to_string(ret) + ")!");
|
LogFile.WriteToFile(ESP_LOG_ERROR, "MQTT - Could not register event (ret=" + std::to_string(ret) + ")!");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ret = esp_mqtt_client_start(client);
|
||||||
|
if (ret != ESP_OK)
|
||||||
|
{
|
||||||
|
LogFile.WriteToFile(ESP_LOG_WARN, "MQTT - Could not start client (ret=" + std::to_string(ret) + "), retrying...");
|
||||||
ret = esp_mqtt_client_start(client);
|
ret = esp_mqtt_client_start(client);
|
||||||
if (ret != ESP_OK)
|
if (ret != ESP_OK)
|
||||||
{
|
{
|
||||||
@@ -180,6 +185,7 @@ bool MQTT_Init() {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LogFile.WriteToFile(ESP_LOG_ERROR, "MQTT - Could not init client!");
|
LogFile.WriteToFile(ESP_LOG_ERROR, "MQTT - Could not init client!");
|
||||||
|
|||||||
Reference in New Issue
Block a user