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

[api] ensure fair network sharing + prevent lost state changes via deferred publish at high event load (#7547)

Co-authored-by: Keith Burzinski <kbx81x@gmail.com>
This commit is contained in:
Nick Kinnan
2025-02-24 15:20:21 -08:00
committed by GitHub
parent 422fb8f1a5
commit 6aba1dbd73
6 changed files with 623 additions and 119 deletions

View File

@@ -72,7 +72,7 @@ void APIServer::setup() {
logger::global_logger->add_on_log_callback([this](int level, const char *tag, const char *message) {
for (auto &c : this->clients_) {
if (!c->remove_)
c->send_log_message(level, tag, message);
c->try_send_log_message(level, tag, message);
}
});
}
@@ -86,7 +86,7 @@ void APIServer::setup() {
[this](const std::shared_ptr<esp32_camera::CameraImage> &image) {
for (auto &c : this->clients_) {
if (!c->remove_)
c->send_camera_state(image);
c->set_camera_state(image);
}
});
}