Force re-connect when losing WiFi

Apparently the ESP32 does not auto re-connect to WiFi, so enforce it.
This commit is contained in:
Stefan Berger 2023-07-13 15:41:58 +02:00
parent 57c60ed0f1
commit 3872bd7a08

View File

@ -116,7 +116,9 @@ void runStratumWorker(void *name) {
while(true) {
if(WiFi.status() != WL_CONNECTED){
vTaskDelay(1000 / portTICK_PERIOD_MS);
// WiFi is disconnected, so reconnect now
WiFi.reconnect();
vTaskDelay(5000 / portTICK_PERIOD_MS);
continue;
}