From 1dba106920f014cd69c9b555d7af967a8639ba65 Mon Sep 17 00:00:00 2001 From: biologist79 <57354741+biologist79@users.noreply.github.com> Date: Sun, 16 May 2021 19:32:45 +0200 Subject: [PATCH] Extended wifi-timeout --- src/main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 3ea2d56..af5999a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3455,12 +3455,12 @@ wl_status_t wifiManager(void) { WiFi.begin(_ssid, _pwd); uint8_t tryCount=0; - while (WiFi.status() != WL_CONNECTED && tryCount <= 4) { + while (WiFi.status() != WL_CONNECTED && tryCount <= 12) { delay(500); Serial.print(F(".")); tryCount++; wifiCheckLastTimestamp = millis(); - if (tryCount >= 4 && WiFi.status() == WL_CONNECT_FAILED) { + if (tryCount >= 6 && WiFi.status() == WL_CONNECT_FAILED) { WiFi.begin(_ssid, _pwd); // ESP32-workaround (otherwise WiFi-connection sometimes fails) } } @@ -5196,4 +5196,4 @@ void audio_icyurl(const char *info) { //homepage void audio_lasthost(const char *info) { //stream URL played snprintf(logBuf, serialLoglength, "lasthost : %s", info); loggerNl(serialDebug, logBuf, LOGLEVEL_INFO); -} \ No newline at end of file +}