Fix infinite loop in http_request for ESP-IDF. (#6963)

This commit is contained in:
Kevin P. Fleming 2024-06-21 17:18:43 -04:00 committed by GitHub
parent 6c11f0bd51
commit 67bd5db6d6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -90,7 +90,7 @@ std::shared_ptr<HttpContainer> HttpRequestIDF::start(std::string url, std::strin
int write_left = body_len;
int write_index = 0;
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);
if (written < 0) {
err = ESP_FAIL;