mirror of
https://github.com/esphome/esphome.git
synced 2026-09-30 08:20:21 +00:00
[esp32] Preserve crash data across OTA rollback reboots
Don't clear the crash data magic marker at boot time. Previously, crash_handler_read_and_clear() would clear the magic immediately, so if OTA rollback triggered a reboot before an API client connected, the crash trace was lost. Now the magic is only cleared after crash_handler_log() delivers the data to an API client via crash_handler_clear().
This commit is contained in:
@@ -276,6 +276,7 @@ class APIConnection final : public APIServerConnectionBase {
|
||||
App.schedule_dump_config();
|
||||
#ifdef USE_ESP32_CRASH_HANDLER
|
||||
esp32::crash_handler_log();
|
||||
esp32::crash_handler_clear();
|
||||
#endif
|
||||
#ifdef USE_RP2040_CRASH_HANDLER
|
||||
rp2040::crash_handler_log();
|
||||
|
||||
Reference in New Issue
Block a user