From 454709559ba7c5ff9fe032b01ec06cb5f9ab0793 Mon Sep 17 00:00:00 2001 From: Rickard Andersson Date: Mon, 12 Jun 2023 13:38:12 +0300 Subject: [PATCH] fix(dns): don't exit early on no hosts in hosts file If we don't have any hosts specified we'll still not generate any overrides which is fine, but we'll continue onto actually trying to resolve the hostname we came into the function for initially. --- core/net/dns_unix.odin | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/core/net/dns_unix.odin b/core/net/dns_unix.odin index bbecc7476..e9b7bd066 100644 --- a/core/net/dns_unix.odin +++ b/core/net/dns_unix.odin @@ -44,9 +44,6 @@ _get_dns_records_os :: proc(hostname: string, type: DNS_Record_Type, allocator : if !hosts_ok { return nil, .Invalid_Hosts_Config_Error } - if len(hosts) == 0 { - return - } host_overrides := make([dynamic]DNS_Record) for host in hosts { @@ -80,4 +77,4 @@ _get_dns_records_os :: proc(hostname: string, type: DNS_Record_Type, allocator : } return get_dns_records_from_nameservers(hostname, type, name_servers, host_overrides[:]) -} \ No newline at end of file +}