Add connection triggers to api (#5628)

This commit is contained in:
Jesse Hills committed 2023-11-01 12:19:16 +13:00
1 parent 1e0daefa16
commit 0ea4de5f4c
5 files changed
+68 -27

No files matched your search

+1
View File
@@ -111,6 +111,7 @@ void APIServer::loop() {
[](const std::unique_ptr<APIConnection> &conn) { return !conn->remove_; });
// print disconnection messages
for (auto it = new_end; it != this->clients_.end(); ++it) {
this->client_disconnected_trigger_->trigger((*it)->client_info_, (*it)->client_peername_);
ESP_LOGV(TAG, "Removing connection to %s", (*it)->client_info_.c_str());
}
// resize vector