diff --git a/scene/main/http_request.cpp b/scene/main/http_request.cpp index e89000f21b9..a391ac47772 100644 --- a/scene/main/http_request.cpp +++ b/scene/main/http_request.cpp @@ -349,8 +349,9 @@ bool HTTPRequest::_update_connection() { } client->poll(); - if (client->get_status() != HTTPClient::STATUS_BODY) - break; // State changed after this poll, will check at next iteration. + if (client->get_status() != HTTPClient::STATUS_BODY) { + return false; + } PoolByteArray chunk = client->read_response_body_chunk(); downloaded += chunk.size();