mirror of
https://github.com/esphome/esphome.git
synced 2026-09-14 00:28:39 +00:00
[http_request] Fix infinite loop when server doesn't send Content-Length header (#12480)
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.5
parent
2e899dd010
commit
260ffba2a5
@@ -76,6 +76,11 @@ void HttpRequestUpdate::update_task(void *params) {
|
||||
|
||||
yield();
|
||||
|
||||
if (read_bytes <= 0) {
|
||||
// Network error or connection closed - break to avoid infinite loop
|
||||
break;
|
||||
}
|
||||
|
||||
read_index += read_bytes;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user