1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-26 23:22:21 +01:00

Reduce API component memory usage with conditional compilation (#9262)

This commit is contained in:
J. Nick Koston
2025-06-29 22:33:35 -05:00
committed by GitHub
parent 7f8dd4b254
commit 6a354d7c94
7 changed files with 338 additions and 17 deletions

View File

@@ -184,7 +184,9 @@ void APIServer::loop() {
}
// Rare case: handle disconnection
#ifdef USE_API_CLIENT_DISCONNECTED_TRIGGER
this->client_disconnected_trigger_->trigger(client->client_info_, client->client_peername_);
#endif
ESP_LOGV(TAG, "Remove connection %s", client->client_info_.c_str());
// Swap with the last element and pop (avoids expensive vector shifts)