[api] Use loop-based reboot timeout check to avoid scheduler heap churn (#12291)

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
J. Nick Koston
2025-12-04 19:14:35 -06:00
committed by GitHub
co-authored by Copilot
parent 80e881655f
commit 637cb3f04a
2 changed files with 21 additions and 19 deletions
+1 -1
View File
@@ -202,7 +202,6 @@ class APIServer : public Component,
#endif
protected:
void schedule_reboot_timeout_();
#ifdef USE_API_NOISE
bool update_noise_psk_(const SavedNoisePsk &new_psk, const LogString *save_log_msg, const LogString *fail_log_msg,
const psk_t &active_psk, bool make_active);
@@ -218,6 +217,7 @@ class APIServer : public Component,
// 4-byte aligned types
uint32_t reboot_timeout_{300000};
uint32_t last_connected_{0};
// Vectors and strings (12 bytes each on 32-bit)
std::vector<std::unique_ptr<APIConnection>> clients_;