diff options
author | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2021-02-27 21:46:27 +0100 |
---|---|---|
committer | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2021-02-27 21:51:07 +0100 |
commit | d61cd469f105d269d66c286bb1efd304a5abb0a5 (patch) | |
tree | 4190fb21319d97f403845a13c1c71aa22ef36c88 /scene | |
parent | 0e8fae1038cb27372777623b1af26e6f0cfb34fa (diff) |
[Net] Better EOF handling in HTTPRequest.
This fix request_completed being emitted two times, the first with the
result, the second as a failure when retrieving responses served with
read-until-EOF.
Diffstat (limited to 'scene')
-rw-r--r-- | scene/main/http_request.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/scene/main/http_request.cpp b/scene/main/http_request.cpp index ce7d6ef13c..77bdf09426 100644 --- a/scene/main/http_request.cpp +++ b/scene/main/http_request.cpp @@ -415,6 +415,7 @@ bool HTTPRequest::_update_connection() { } else if (client->get_status() == HTTPClient::STATUS_DISCONNECTED) { // We read till EOF, with no errors. Request is done. call_deferred("_request_done", RESULT_SUCCESS, response_code, response_headers, body); + return true; } return false; |