aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-09-30 13:02:46 +0200
committerKim Alvefur <zash@zash.se>2018-09-30 13:02:46 +0200
commitf0974502f044e7c57bf03ea65d93f78882e4f0c8 (patch)
treefdc3aa08edc52b8368e8ab378c416e3d858ed03f
parentbf44e646cde2386f1fc823ecc236c7168ba6ea39 (diff)
downloadprosody-f0974502f044e7c57bf03ea65d93f78882e4f0c8.tar.gz
prosody-f0974502f044e7c57bf03ea65d93f78882e4f0c8.zip
net.resolvers.service: Sort SRV records in correct direction
-rw-r--r--net/resolvers/service.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/resolvers/service.lua b/net/resolvers/service.lua
index 0ce4a5cb..b5a2d821 100644
--- a/net/resolvers/service.lua
+++ b/net/resolvers/service.lua
@@ -47,7 +47,7 @@ function methods:next(cb)
return;
end
- table.sort(answer, function (a, b) return a.srv.priority > b.srv.priority end);
+ table.sort(answer, function (a, b) return a.srv.priority < b.srv.priority end);
for _, record in ipairs(answer) do
table.insert(targets, { record.srv.target, record.srv.port, self.conn_type, self.extra });
end