Changeset

10624:0725b7b8dc14

net.resolvers.basic: Obey extra.use_ipv4/use_ipv6
author Matthew Wild <mwild1@gmail.com>
date Sat, 25 Jan 2020 14:38:17 +0000
parents 10623:f51c88baeb8a
children 10625:3bfb20be844c
files net/resolvers/basic.lua
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/net/resolvers/basic.lua	Sat Jan 25 14:25:29 2020 +0000
+++ b/net/resolvers/basic.lua	Sat Jan 25 14:38:17 2020 +0000
@@ -43,7 +43,7 @@
 	-- Resolve DNS to target list
 	local dns_resolver = adns.resolver();
 
-	if self.connector_options.use_ipv4 ~= false then
+	if not self.extra or self.extra.use_ipv4 ~= false then
 		dns_resolver:lookup(function (answer)
 			if answer then
 				for _, record in ipairs(answer) do
@@ -54,7 +54,7 @@
 		end, self.hostname, "A", "IN");
 	end
 
-	if self.connector_options.use_ipv6 ~= false then
+	if not self.extra or self.extra.use_ipv6 ~= false then
 		dns_resolver:lookup(function (answer)
 			if answer then
 				for _, record in ipairs(answer) do