From 587daa780ed4052f28f6c246e7dfd269df2c3989 Mon Sep 17 00:00:00 2001 From: Chuck Date: Tue, 12 May 2026 12:03:17 -0400 Subject: [PATCH] revert: restore AP-mode grace period to 90s (3 checks) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The counter reset after NM restart already fully prevents the SSH-lockout cascade: _disconnected_checks can never accumulate across NM restarts because it is reset to 0 before the next daemon iteration runs. The 3→6 increase provided no additional fix for the described problem and caused a UX regression: fresh Pi devices with no WiFi configured would wait 3 minutes instead of 90 seconds for the LEDMatrix-Setup hotspot to appear. Co-Authored-By: Claude Sonnet 4.6 --- src/wifi_manager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wifi_manager.py b/src/wifi_manager.py index cdc1f625..e31bd5fb 100644 --- a/src/wifi_manager.py +++ b/src/wifi_manager.py @@ -140,7 +140,7 @@ class WiFiManager: # Initialize disconnected check counter for grace period # This prevents AP mode from enabling on transient network hiccups self._disconnected_checks = 0 - self._disconnected_checks_required = 6 # Require 6 consecutive disconnected checks (3 minutes at 30s interval) + self._disconnected_checks_required = 3 # Require 3 consecutive disconnected checks (90 seconds at 30s interval) # Timestamp set when AP mode is enabled; used for the idle-timeout check self._ap_enabled_at: Optional[float] = None