diff options
author | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2021-03-02 12:42:52 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-02 12:42:52 +0100 |
commit | 9dd28a2953e1af1e2250d3d8401bc9d42a397869 (patch) | |
tree | 3e9ac019c877f6c2561f410147f54393d93c3845 | |
parent | 0862b2926076790fb771e2d8322ea254e972c285 (diff) | |
parent | bc8fe786b2fa4ad4bfb10daeb9bfe38eddfc2496 (diff) |
Merge pull request #35246 from zaksnet/disconnect-while-downloading
Disconnect while downloading
-rw-r--r-- | scene/main/http_request.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/scene/main/http_request.cpp b/scene/main/http_request.cpp index 77bdf09426..71c372aec2 100644 --- a/scene/main/http_request.cpp +++ b/scene/main/http_request.cpp @@ -387,6 +387,9 @@ bool HTTPRequest::_update_connection() { } client->poll(); + if (client->get_status() != HTTPClient::STATUS_BODY) { + return false; + } PackedByteArray chunk = client->read_response_body_chunk(); downloaded.add(chunk.size()); |