Skip to content

Commit

Permalink
Fix infinite loop in http_request for ESP-IDF. (#6963)
Browse files Browse the repository at this point in the history
  • Loading branch information
kpfleming committed Jun 21, 2024
1 parent 6c11f0b commit 67bd5db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion esphome/components/http_request/http_request_idf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 67bd5db

Please sign in to comment.