Merge pull request #64472 from Mickeon/try-fixing-http-bug

Prevent HTTPRequest from polling invalid client
This commit is contained in:
Fabio Alessandrelli 2022-09-07 07:51:14 +02:00 committed by GitHub
commit 7c99911fbd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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