From 6dfb01673a236614ecf3de1f4bc2c9611b9d9606 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sat, 29 Sep 2018 22:03:16 +0200 Subject: net.resolvers.service: Add support for fallback to bare domain and default port The default port must be configured separately to enable this behavior --- net/resolvers/service.lua | 3 +++ 1 file changed, 3 insertions(+) (limited to 'net') diff --git a/net/resolvers/service.lua b/net/resolvers/service.lua index 9e634dbe..ac6e93da 100644 --- a/net/resolvers/service.lua +++ b/net/resolvers/service.lua @@ -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 -- cgit v1.2.3