Implement proper API connection teardown before deep sleep/reboot (#9008)

This commit is contained in:
J. Nick Koston
2025-06-09 10:29:26 +12:00
committed by GitHub
parent 50cdec19dd
commit 9cc2a04d54
8 changed files with 156 additions and 64 deletions
+6
View File
@@ -110,6 +110,12 @@ class Component {
virtual void on_shutdown() {}
virtual void on_safe_shutdown() {}
/** Called during teardown to allow component to gracefully finish operations.
*
* @return true if teardown is complete, false if more time is needed
*/
virtual bool teardown() { return true; }
uint32_t get_component_state() const;
/** Mark this component as failed. Any future timeouts/intervals/setup/loop will no longer be called.