mirror of
https://github.com/esphome/esphome.git
synced 2026-03-03 19:28:20 -07:00
[api] Avoid heap allocation for client connected/disconnected triggers (#13688)
This commit is contained in:
@@ -211,7 +211,7 @@ void APIServer::loop() {
|
||||
|
||||
#ifdef USE_API_CLIENT_DISCONNECTED_TRIGGER
|
||||
// Fire trigger after client is removed so api.connected reflects the true state
|
||||
this->client_disconnected_trigger_->trigger(client_name, client_peername);
|
||||
this->client_disconnected_trigger_.trigger(client_name, client_peername);
|
||||
#endif
|
||||
// Don't increment client_index since we need to process the swapped element
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user