summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabio Alessandrelli <fabio.alessandrelli@gmail.com>2022-09-07 07:51:14 +0200
committerGitHub <noreply@github.com>2022-09-07 07:51:14 +0200
commit7c99911fbd4cdaf000769485a5be850dfd9e2529 (patch)
tree7093c1c60115f14cc32131ca49336c2774c8715d
parentb17a306239db5c5d5cc451cbbe577682e351570d (diff)
parent9e284f68ec79be745c2cb3d3a4eead3dfcca7cca (diff)
Merge pull request #64472 from Mickeon/try-fixing-http-bug
Prevent HTTPRequest from polling invalid client
-rw-r--r--core/io/http_client_tcp.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/io/http_client_tcp.cpp b/core/io/http_client_tcp.cpp
index 9499a6f8e3..4aa1f2ed8c 100644
--- a/core/io/http_client_tcp.cpp
+++ b/core/io/http_client_tcp.cpp
@@ -94,6 +94,10 @@ Error HTTPClientTCP::connect_to_host(const String &p_host, int p_port, bool p_ss
} else {
// Host contains hostname and needs to be resolved to IP.
resolving = IP::get_singleton()->resolve_hostname_queue_item(server_host);
+ if (resolving == IP::RESOLVER_INVALID_ID) {
+ status = STATUS_CANT_RESOLVE;
+ return ERR_CANT_RESOLVE;
+ }
status = STATUS_RESOLVING;
}