mirror of
https://github.com/esphome/esphome.git
synced 2026-09-16 09:38:42 +00:00
58100f2720c9f16dd6c91c99c3fe7e9f51abe461
The multi-message batch path in process_batch_multi_ bypassed set_nodelay_for_message(), so batch data written to the socket would sit in LWIP's Nagle buffer when log messages had previously enabled Nagle. The remote wouldn't ACK until it sent its own data (e.g. a ping), which could take 20+ seconds. This caused log-only API clients (like esphome logs) to time out waiting for ListEntitiesDoneResponse. Additionally, when LIST_ENTITIES completed without a state subscription, the batched entity listing responses were never explicitly flushed — they waited for the 100ms batch timer instead of being sent immediately like the INITIAL_STATE completion path already did. Fixes both issues: - Call set_nodelay_for_message(false) before write_protobuf_messages in process_batch_multi_ to ensure TCP_NODELAY is on - Extract finalize_iterator_sync_() helper and call it when LIST_ENTITIES completes without state_subscription
Description
ESPHome is a system to control your ESP8266/ESP32 by simple yet powerful configuration files and control them remotely through Home Automation systems.
Readme
Multiple Licenses
601 MiB
Languages
C++
55.8%
Python
43.6%
C
0.3%
JavaScript
0.2%
