mirror of
https://github.com/0xFEEDC0DE64/arduino-esp32.git
synced 2025-07-01 13:00:59 +02:00
leave possible endless loop (#1986)
This commit is contained in:
@ -1175,6 +1175,10 @@ int HTTPClient::writeToStreamDataBlock(Stream * stream, int size)
|
|||||||
if(readBytes > buff_size) {
|
if(readBytes > buff_size) {
|
||||||
readBytes = buff_size;
|
readBytes = buff_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// stop if no more reading
|
||||||
|
if (readBytes == 0)
|
||||||
|
break;
|
||||||
|
|
||||||
// read data
|
// read data
|
||||||
int bytesRead = _client->readBytes(buff, readBytes);
|
int bytesRead = _client->readBytes(buff, readBytes);
|
||||||
|
Reference in New Issue
Block a user