1
0
Fork 0
mirror of https://github.com/bjc/prosody.git synced 2025-04-06 14:47:37 +03:00

Merge 0.11->trunk

This commit is contained in:
Matthew Wild 2020-07-10 13:01:17 +01:00
commit 68b6e79bd6

View file

@ -70,6 +70,7 @@ end
local function new(hostname, port, conn_type, extra)
local ascii_host = idna_to_ascii(hostname);
local targets = nil;
conn_type = conn_type or "tcp";
local is_ip = inet_pton(hostname);
if not is_ip and hostname:sub(1,1) == '[' then
@ -87,7 +88,7 @@ local function new(hostname, port, conn_type, extra)
return setmetatable({
hostname = ascii_host;
port = port;
conn_type = conn_type or "tcp";
conn_type = conn_type;
extra = extra;
targets = targets;
}, resolver_mt);