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
commite8e4292dc4b5f99e5fa060ddab26184929afd302 (patch)
treefdc3aa08edc52b8368e8ab378c416e3d858ed03f
parentca4804c4134b95113370d01aa0798fc32ba52117 (diff)
downloadprosody-e8e4292dc4b5f99e5fa060ddab26184929afd302.tar.gz
prosody-e8e4292dc4b5f99e5fa060ddab26184929afd302.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