Skip to content

Commit 7b811f9

Browse files
FotoFieberme-no-dev
authored andcommitted
leave possible endless loop (#1986)
1 parent 1fdc660 commit 7b811f9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: libraries/HTTPClient/src/HTTPClient.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -1175,6 +1175,10 @@ int HTTPClient::writeToStreamDataBlock(Stream * stream, int size)
11751175
if(readBytes > buff_size) {
11761176
readBytes = buff_size;
11771177
}
1178+
1179+
// stop if no more reading
1180+
if (readBytes == 0)
1181+
break;
11781182

11791183
// read data
11801184
int bytesRead = _client->readBytes(buff, readBytes);

0 commit comments

Comments
 (0)