|
@@ -349,6 +349,8 @@ bool HTTPRequest::_update_connection() {
|
|
}
|
|
}
|
|
|
|
|
|
client->poll();
|
|
client->poll();
|
|
|
|
+ if (client->get_status() != HTTPClient::STATUS_BODY)
|
|
|
|
+ break; // State changed after this poll, will check at next iteration.
|
|
|
|
|
|
PoolByteArray chunk = client->read_response_body_chunk();
|
|
PoolByteArray chunk = client->read_response_body_chunk();
|
|
downloaded += chunk.size();
|
|
downloaded += chunk.size();
|