mirror of
https://github.com/esphome/esphome.git
synced 2024-11-13 10:25:03 +01:00
Fix infinite loop in http_request for ESP-IDF. (#6963)
This commit is contained in:
parent
6c11f0bd51
commit
67bd5db6d6
@ -90,7 +90,7 @@ std::shared_ptr<HttpContainer> HttpRequestIDF::start(std::string url, std::strin
|
|||||||
int write_left = body_len;
|
int write_left = body_len;
|
||||||
int write_index = 0;
|
int write_index = 0;
|
||||||
const char *buf = body.c_str();
|
const char *buf = body.c_str();
|
||||||
while (body_len > 0) {
|
while (write_left > 0) {
|
||||||
int written = esp_http_client_write(client, buf + write_index, write_left);
|
int written = esp_http_client_write(client, buf + write_index, write_left);
|
||||||
if (written < 0) {
|
if (written < 0) {
|
||||||
err = ESP_FAIL;
|
err = ESP_FAIL;
|
||||||
|
Loading…
Reference in New Issue
Block a user