Review comments taken on board

This commit is contained in:
jpirnay
2026-05-24 16:40:05 +02:00
parent a9c7894120
commit 9bb9739b27
3 changed files with 21 additions and 2 deletions
@@ -549,6 +549,13 @@ void WifiSelectionActivity::checkConnectionStatus() {
LOG_DBG("WIFI", "Hint attempt did not connect (%s after %lu ms), retrying with full scan",
hintHardFail ? "hard fail" : "timeout", millis() - connectionStartTime);
hintFallbackDone = true;
// Wipe the stale cache before retrying. If the fallback succeeds, the success
// path writes a fresh cache (one extra SD write). If it fails or is interrupted,
// we won't carry a known-bad hint into the next session.
{
RenderLock lock(*this);
WIFI_STORE.clearConnectionCache(selectedSSID);
}
WiFi.disconnect(true, false);
connectionStartTime = millis();
issueWifiBegin(/*useHint=*/false);