Skip to content

Commit

Permalink
OTA: make fetch blocking for real and also wait for data
Browse files Browse the repository at this point in the history
  • Loading branch information
pennam committed Jun 10, 2024
1 parent c300878 commit b8d5305
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ota/interface/OTAInterfaceDefault.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ OTACloudProcessInterface::State OTADefaultCloudProcessInterface::fetch() {

do {
if(http_client->available() == 0) {
goto exit;
/* Avoid tight loop and allow yield */
delay(1);
continue;
}

http_res = http_client->read(context->buffer, context->buf_len);
Expand Down

0 comments on commit b8d5305

Please sign in to comment.