[api] Avoid heap allocation for client connected/disconnected triggers (#13688)

This commit is contained in:
J. Nick Koston
2026-02-02 04:50:01 +01:00
committed by GitHub
parent 652c02b9ab
commit 8791c24072
2 changed files with 5 additions and 7 deletions

View File

@@ -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
}