mirror of
https://github.com/bjc/prosody.git
synced 2025-04-05 06:07:37 +03:00
net.resolvers.basic: Suffix IPv4 TCP socket types with '4' to match eg 'tcp6'
This commit is contained in:
parent
2104ac9fb0
commit
83e1a2af50
1 changed files with 2 additions and 2 deletions
|
@ -31,7 +31,7 @@ function methods:next(cb)
|
|||
if #is_ip == 16 then
|
||||
cb(self.conn_type.."6", self.hostname, self.port, self.extra);
|
||||
elseif #is_ip == 4 then
|
||||
cb(self.conn_type, self.hostname, self.port, self.extra);
|
||||
cb(self.conn_type.."4", self.hostname, self.port, self.extra);
|
||||
end
|
||||
return;
|
||||
end
|
||||
|
@ -41,7 +41,7 @@ function methods:next(cb)
|
|||
dns_resolver:lookup(function (answer)
|
||||
if answer then
|
||||
for _, record in ipairs(answer) do
|
||||
table.insert(targets, { self.conn_type, record.a, self.port, self.extra });
|
||||
table.insert(targets, { self.conn_type.."4", record.a, self.port, self.extra });
|
||||
end
|
||||
end
|
||||
ready();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue