|
@@ -480,7 +480,8 @@ static void event_handler(void* arg, esp_event_base_t event_base, int32_t event_
|
|
|
if (WIFIReconnectCnt >= 10) {
|
|
if (WIFIReconnectCnt >= 10) {
|
|
|
WIFIReconnectCnt = 0;
|
|
WIFIReconnectCnt = 0;
|
|
|
LogFile.WriteToFile(ESP_LOG_ERROR, TAG, "Disconnected, multiple reconnect attempts failed (" +
|
|
LogFile.WriteToFile(ESP_LOG_ERROR, TAG, "Disconnected, multiple reconnect attempts failed (" +
|
|
|
- std::to_string(disconn->reason) + "), still retrying...");
|
|
|
|
|
|
|
+ std::to_string(disconn->reason) + "), retrying after 5s");
|
|
|
|
|
+ vTaskDelay(5000 / portTICK_PERIOD_MS); // Delay between the reconnections
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
else if (event_base == WIFI_EVENT && event_id == WIFI_EVENT_STA_CONNECTED)
|
|
else if (event_base == WIFI_EVENT && event_id == WIFI_EVENT_STA_CONNECTED)
|