diff options
author | Kim Alvefur <zash@zash.se> | 2018-09-29 22:03:16 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2018-09-29 22:03:16 +0200 |
commit | 6dfb01673a236614ecf3de1f4bc2c9611b9d9606 (patch) | |
tree | e684ccfd98bb44cced2061b92da208eddca3392d /net/resolvers | |
parent | ce0ce78b787f25dd0fb877b91fcea3f1ef61ae85 (diff) | |
download | prosody-6dfb01673a236614ecf3de1f4bc2c9611b9d9606.tar.gz prosody-6dfb01673a236614ecf3de1f4bc2c9611b9d9606.zip |
net.resolvers.service: Add support for fallback to bare domain and default port
The default port must be configured separately to enable this behavior
Diffstat (limited to 'net/resolvers')
-rw-r--r-- | net/resolvers/service.lua | 3 |
1 files changed, 3 insertions, 0 deletions
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 |