summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-07-01 10:21:52 +0200
committerGitHub <noreply@github.com>2019-07-01 10:21:52 +0200
commited2f753fdbacf7d7b4a8f0408dddb19ae2a6707f (patch)
tree652246574fe1789527e82594e49ae4f531626bc4
parent336010d676196caee68e903fe9b61d9e877c6167 (diff)
parent2eac1a64f7240a842dae4d4d69be57e28c06f3d3 (diff)
Merge pull request #30218 from Faless/fix/http_request
Fix HTTPRequest status checks.
-rw-r--r--scene/main/http_request.cpp7
-rw-r--r--scene/main/http_request.h2
2 files changed, 3 insertions, 6 deletions
diff --git a/scene/main/http_request.cpp b/scene/main/http_request.cpp
index e65314644e..88b942ee45 100644
--- a/scene/main/http_request.cpp
+++ b/scene/main/http_request.cpp
@@ -425,7 +425,7 @@ void HTTPRequest::_notification(int p_what) {
void HTTPRequest::set_use_threads(bool p_use) {
- ERR_FAIL_COND(status != HTTPClient::STATUS_DISCONNECTED);
+ ERR_FAIL_COND(get_http_client_status() != HTTPClient::STATUS_DISCONNECTED);
use_threads = p_use;
}
@@ -436,7 +436,7 @@ bool HTTPRequest::is_using_threads() const {
void HTTPRequest::set_body_size_limit(int p_bytes) {
- ERR_FAIL_COND(status != HTTPClient::STATUS_DISCONNECTED);
+ ERR_FAIL_COND(get_http_client_status() != HTTPClient::STATUS_DISCONNECTED);
body_size_limit = p_bytes;
}
@@ -448,7 +448,7 @@ int HTTPRequest::get_body_size_limit() const {
void HTTPRequest::set_download_file(const String &p_file) {
- ERR_FAIL_COND(status != HTTPClient::STATUS_DISCONNECTED);
+ ERR_FAIL_COND(get_http_client_status() != HTTPClient::STATUS_DISCONNECTED);
download_to_file = p_file;
}
@@ -546,7 +546,6 @@ HTTPRequest::HTTPRequest() {
downloaded = 0;
body_size_limit = -1;
file = NULL;
- status = HTTPClient::STATUS_DISCONNECTED;
}
HTTPRequest::~HTTPRequest() {
diff --git a/scene/main/http_request.h b/scene/main/http_request.h
index baabda4010..2e58d579ba 100644
--- a/scene/main/http_request.h
+++ b/scene/main/http_request.h
@@ -88,8 +88,6 @@ private:
int redirections;
- HTTPClient::Status status;
-
bool _update_connection();
int max_redirects;