mirror of
https://github.com/bjc/prosody.git
synced 2025-04-04 21:57:45 +03:00
net.resolvers.basic: Obey extra.use_ipv4/use_ipv6
This commit is contained in:
parent
c5fcad823a
commit
d1fbb9197f
1 changed files with 2 additions and 2 deletions
|
@ -43,7 +43,7 @@ function methods:next(cb)
|
||||||
-- Resolve DNS to target list
|
-- Resolve DNS to target list
|
||||||
local dns_resolver = adns.resolver();
|
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)
|
dns_resolver:lookup(function (answer)
|
||||||
if answer then
|
if answer then
|
||||||
for _, record in ipairs(answer) do
|
for _, record in ipairs(answer) do
|
||||||
|
@ -54,7 +54,7 @@ function methods:next(cb)
|
||||||
end, self.hostname, "A", "IN");
|
end, self.hostname, "A", "IN");
|
||||||
end
|
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)
|
dns_resolver:lookup(function (answer)
|
||||||
if answer then
|
if answer then
|
||||||
for _, record in ipairs(answer) do
|
for _, record in ipairs(answer) do
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue