Fix reconnects happens to quickly #919

This commit is contained in:
fvanroie 2025-07-18 22:22:55 +02:00
parent 9840c77d39
commit f08eafc07f
2 changed files with 8 additions and 7 deletions

View File

@ -74,8 +74,8 @@ build_flags =
; -- Hasp build options ----------------------------
-D HASP_VER_MAJ=0
-D HASP_VER_MIN=7
;-D HASP_VER_REV=4
-D HASP_VER_REV=0-rc15
-D HASP_VER_REV=0.1
;-D HASP_VER_REV=0-rc15
;-D HASP_VER_REV=4-rc1
${override.build_flags}

View File

@ -509,7 +509,7 @@ void wifiSetup()
WiFi.setScanMethod(WIFI_ALL_CHANNEL_SCAN);
wifiReconnect();
WiFi.setAutoReconnect(false); // done in wifiEvery5Seconds
WiFi.setAutoReconnect(true); // done in wifiEvery5Seconds
LOG_TRACE(TAG_WIFI, F(D_WIFI_CONNECTING_TO), wifiSsid);
}
#endif
@ -532,10 +532,11 @@ bool wifiEvery5Seconds()
return true;
}
if(wifiEnabled) {
LOG_WARNING(TAG_WIFI, F("No Connection... retry %d"), network_reconnect_counter);
wifiReconnect();
}
// Issue #919 : Reconnects happens to quickly
// if(wifiEnabled) {
// LOG_WARNING(TAG_WIFI, F("No Connection... retry %d"), network_reconnect_counter);
// wifiReconnect();
// }
return false;
}