Merge pull request #63944 from Faless/net/4.x_ip_no_err

[Net] IP uses print_verbose when getaddrinfo fails.
This commit is contained in:
Fabio Alessandrelli 2022-08-05 14:36:37 +02:00 committed by GitHub
commit f5a89bf460
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -95,12 +95,12 @@ void IPUnix::_resolve_hostname(List<IPAddress> &r_addresses, const String &p_hos
int s = getaddrinfo(p_hostname.utf8().get_data(), nullptr, &hints, &result);
if (s != 0) {
ERR_PRINT("getaddrinfo failed! Cannot resolve hostname.");
print_verbose("getaddrinfo failed! Cannot resolve hostname.");
return;
}
if (result == nullptr || result->ai_addr == nullptr) {
ERR_PRINT("Invalid response from getaddrinfo");
print_verbose("Invalid response from getaddrinfo");
if (result) {
freeaddrinfo(result);
}