net.resolvers.service: Add support for fallback to bare domain and default port

The default port must be configured separately to enable this behavior
This commit is contained in:
Kim Alvefur 2018-09-29 22:03:16 +02:00
parent ce0ce78b78
commit 6dfb01673a

View file

@ -35,6 +35,9 @@ function methods:next(cb)
dns_resolver:lookup(function (answer)
if answer then
if #answer == 0 then
if self.extra and self.extra.default_port then
table.insert(targets, { self.domain, self.extra.default_port, self.conn_type, self.extra });
end
ready();
return;
end