File tree 2 files changed +4
-2
lines changed
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() {
94
94
95
95
do {
96
96
if (http_client->available () == 0 ) {
97
- goto exit ;
97
+ /* Avoid tight loop and allow yield */
98
+ delay (1 );
99
+ continue ;
98
100
}
99
101
100
102
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 {
51
51
52
52
// The amount of time that each iteration of Fetch has to take at least
53
53
// 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 ;
55
55
56
56
enum OTADownloadState: uint8_t {
57
57
OtaDownloadHeader,
You can’t perform that action at this time.
0 commit comments