fix: restart AutoInterface on WiFi reconnect (greploop)

The `!auto_interface_impl` guard meant start_auto_interface() only ran on the
first WiFi-connect edge; on every reconnect the block was skipped, so
AutoInterface kept stale multicast sockets and peers never rediscovered until
reboot. start_auto_interface() is idempotent (its else-if(!online()) branch
rebinds the sockets), so drop the guard and call it on every connect edge.
TCPClientInterface self-reconnects in its own loop(), so only AutoInterface
needed this.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UWZuYkHBRqNb6BZHV8sTG5
This commit is contained in:
torlando-agent[bot]
2026-06-19 02:16:09 -04:00
co-authored by Claude Opus 4.8
parent d98b6f0682
commit ee059e86ea
+7 -2
View File
@@ -2407,8 +2407,13 @@ void loop() {
}
// AutoInterface init at boot fails its WiFi-connected gate
// because WiFi typically associates 2-5s after the boot
// block runs. Retry here once WiFi actually lands.
if (!auto_interface_impl && app_settings.auto_enabled) {
// block runs. Retry here once WiFi actually lands. Also handles
// reconnect: the old `!auto_interface_impl` guard meant this only
// ran on the first connect, so after a WiFi drop AutoInterface kept
// stale multicast sockets and peers never rediscovered until reboot.
// start_auto_interface() is idempotent — its else-if(!online())
// branch rebinds the sockets on a reconnect.
if (app_settings.auto_enabled) {
start_auto_interface();
}
}