aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-09-29 22:03:16 +0200
committerKim Alvefur <zash@zash.se>2018-09-29 22:03:16 +0200
commita4a7a46a349c76817d45ca0cd7220f312eadac05 (patch)
treee684ccfd98bb44cced2061b92da208eddca3392d /net
parent26f0109a5feb7a1febd55a437678138c8e8dd59d (diff)
downloadprosody-a4a7a46a349c76817d45ca0cd7220f312eadac05.tar.gz
prosody-a4a7a46a349c76817d45ca0cd7220f312eadac05.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')
-rw-r--r--net/resolvers/service.lua3
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