File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -94,7 +94,9 @@ OTACloudProcessInterface::State OTADefaultCloudProcessInterface::fetch() {
9494
9595 do {
9696 if (http_client->available () == 0 ) {
97- goto exit;
97+ /* Avoid tight loop and allow yield */
98+ delay (1 );
99+ continue ;
98100 }
99101
100102 http_res = http_client->read (context->buffer , context->buf_len );
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ class OTADefaultCloudProcessInterface: public OTACloudProcessInterface {
5151
5252 // The amount of time that each iteration of Fetch has to take at least
5353 // This mitigate the issues arising from tasks run in main loop that are using all the computing time
54- static constexpr uint32_t downloadTime = 100 ;
54+ static constexpr uint32_t downloadTime = 2000 ;
5555
5656 enum OTADownloadState: uint8_t {
5757 OtaDownloadHeader,
You can’t perform that action at this time.
0 commit comments