This commit is contained in:
J. Nick Koston
2025-06-05 21:40:25 +01:00
parent 27204e0598
commit 0ff647909d
2 changed files with 3 additions and 1 deletions

View File

@@ -1814,6 +1814,8 @@ void APIConnection::process_batch_() {
this->proto_write_buffer_.resize(this->proto_write_buffer_.size() + this->helper_->frame_footer_size());
}
ESP_LOGD(TAG, "Sending batch: %zu messages, %zu total bytes", processed_count, this->proto_write_buffer_.size());
APIError err = this->helper_->write_protobuf_packets(batch_buffer, packet_info);
if (err != APIError::OK && err != APIError::WOULD_BLOCK) {
on_fatal_error();

View File

@@ -610,7 +610,7 @@ class APIConnection : public APIServerConnection {
};
DeferredBatch deferred_batch_;
static constexpr uint32_t BATCH_DELAY_MS = 50;
static constexpr uint32_t BATCH_DELAY_MS = 100;
static constexpr size_t MAX_BATCH_SIZE_BYTES = 1360; // MTU - 100 bytes safety margin
// Batch mode state for capturing message types