From 93943bc1b9ba5a1595dba7d8083fdb438fa9f252 Mon Sep 17 00:00:00 2001 From: Micky Date: Mon, 15 Aug 2022 23:43:42 +0200 Subject: [PATCH] Prevent HTTPRequest from polling invalid client (cherry picked from commit 9e284f68ec79be745c2cb3d3a4eead3dfcca7cca) --- core/io/http_client.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/io/http_client.cpp b/core/io/http_client.cpp index 753ef6ce8a1..4372e524368 100644 --- a/core/io/http_client.cpp +++ b/core/io/http_client.cpp @@ -101,6 +101,10 @@ Error HTTPClient::connect_to_host(const String &p_host, int p_port, bool p_ssl, } 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; }