Commit 7b811f9b authored by FotoFieber's avatar FotoFieber Committed by Me No Dev

leave possible endless loop (#1986)

parent 1fdc6606
...@@ -1175,6 +1175,10 @@ int HTTPClient::writeToStreamDataBlock(Stream * stream, int size) ...@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment