We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bdbdd7e commit 4e66b69Copy full SHA for 4e66b69
src/bl.cpp
@@ -848,11 +848,9 @@ static https_request_err_e downloadAndShow()
848
849
buffer = (uint8_t *)malloc(counter);
850
if (buffer) {
851
- while (iCount < counter && millis() < (lStartTime + API_FIRST_RETRY*1000) && stream->connected()) {
852
- iLen = stream->available();
853
- if (iLen) {
854
- stream->readBytes(&buffer[iCount], iLen);
855
- iCount += iLen;
+ while (iCount < counter && millis() < (lStartTime + API_FIRST_RETRY*1000)) {
+ if (stream->available()) {
+ buffer[iCount++] = stream->read();
856
} else {
857
vTaskDelay(1); // yield to allow time for the data to arrive
858
}
0 commit comments