diff options
-rw-r--r-- | scene/main/http_request.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/scene/main/http_request.cpp b/scene/main/http_request.cpp index 3c89069816..e89000f21b 100644 --- a/scene/main/http_request.cpp +++ b/scene/main/http_request.cpp @@ -349,6 +349,8 @@ bool HTTPRequest::_update_connection() { } 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(); downloaded += chunk.size(); |