From b01db991a51fb48226e55736ea94f3d2ddf130d9 Mon Sep 17 00:00:00 2001 From: mknjc Date: Mon, 11 Jan 2021 14:46:21 +0100 Subject: [PATCH 1/3] API: copy the data to send into the tcp internal buffer (#1455) Without the flag lwip only holds a reference to the supplied buffers and the reference must be valid until the tcp ack is received. This can't be guaranteed for stack allocated buffers --- esphome/components/api/api_connection.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/esphome/components/api/api_connection.cpp b/esphome/components/api/api_connection.cpp index 1956f3119d..431be5b4dc 100644 --- a/esphome/components/api/api_connection.cpp +++ b/esphome/components/api/api_connection.cpp @@ -676,8 +676,10 @@ bool APIConnection::send_buffer(ProtoWriteBuffer buffer, uint32_t message_type) } } - this->client_->add(reinterpret_cast(header.data()), header.size()); - this->client_->add(reinterpret_cast(buffer.get_buffer()->data()), buffer.get_buffer()->size()); + this->client_->add(reinterpret_cast(header.data()), header.size(), + ASYNC_WRITE_FLAG_COPY | ASYNC_WRITE_FLAG_MORE); + this->client_->add(reinterpret_cast(buffer.get_buffer()->data()), buffer.get_buffer()->size(), + ASYNC_WRITE_FLAG_COPY); bool ret = this->client_->send(); return ret; } From 7acc36d39d82df320396c5532b38129f0ae259b8 Mon Sep 17 00:00:00 2001 From: Guillermo Ruffino Date: Mon, 11 Jan 2021 11:33:43 -0300 Subject: [PATCH 2/3] Revert esptool to 2.8 (#1460) Fixes https://github.com/esphome/issues/issues/1702 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 6ed3b1819f..78aa0442b9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -10,5 +10,5 @@ pytz==2020.5 pyserial==3.5 ifaddr==0.1.7 platformio==5.0.4 -esptool==3.0 +esptool==2.8 click==7.1.2 From f2474c5c45c7bf9dfc992ef8d874f03af33ec43c Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Tue, 12 Jan 2021 09:42:19 +1300 Subject: [PATCH 3/3] Bump version to v1.16.0b3 --- esphome/const.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esphome/const.py b/esphome/const.py index 659531ee7b..a650954a95 100644 --- a/esphome/const.py +++ b/esphome/const.py @@ -2,7 +2,7 @@ MAJOR_VERSION = 1 MINOR_VERSION = 16 -PATCH_VERSION = '0b2' +PATCH_VERSION = '0b3' __short_version__ = f'{MAJOR_VERSION}.{MINOR_VERSION}' __version__ = f'{__short_version__}.{PATCH_VERSION}'