Commit Graph
4 Commits
Author SHA1 Message Date
Valentin V. Bartenev ce510738d5 Web: delay WiFi shutdown and reorder stop logs
This fixes accidental crash when disabling the web panel without an
active MQTT uplink.

When the web panel was disabled, isWebEnabled() immediately returned
false.  If no other network consumer was active, network.loop(false)
tore down WiFi *before* web.loop() stopped the httpd server.

Calling httpd_stop() while WiFi was being freed sometimes caused a
LoadProhibited panic (ieee80211_output_do -> wifi_free).  This only
occurred when the server was stopped after WiFi teardown began.

Fix by including _panel.isRunning() in isWebEnabled(): WiFi stays up
for one extra iteration, so the server is stopped while the stack is
still valid.  Only on the next loop cycle does the network shut down.

Additionally, move the "server stopped" and "redirect server stopped"
log messages to after the actual httpd_stop() / httpd_ssl_stop()
calls.  This prevents a misleading "stopped" message if a crash
happens during teardown.
2026-05-08 20:22:18 +03:00
Jared Dohrman 4b83142b9e fix: start ota is now consistent across command sources 2026-04-23 09:27:48 +10:00
Jared Dohrman 2ad3b134f2 fix: suspend web panel for OTA 2026-04-21 18:19:33 +10:00
Jared Dohrman f67aaebe7e feat: add SD-backed stats archive and dedicated /stats web console 2026-04-15 17:12:32 +10:00