Prevent HTTPRequest from polling invalid client

(cherry picked from commit 9e284f68ec)
This commit is contained in:
Micky 2022-08-15 23:43:42 +02:00 committed by Rémi Verschelde
parent 1b48e17ab8
commit 70b55faa38
1 changed files with 4 additions and 0 deletions

View File

@ -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;
}