aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-09-30 12:51:34 +0200
committerKim Alvefur <zash@zash.se>2018-09-30 12:51:34 +0200
commitbf44e646cde2386f1fc823ecc236c7168ba6ea39 (patch)
tree304cc2f57d881d96d7a7ef5324c070a1e9a4f876
parentc5c2b7036c0024dec390f07672a06e2cb140fd0f (diff)
downloadprosody-bf44e646cde2386f1fc823ecc236c7168ba6ea39.tar.gz
prosody-bf44e646cde2386f1fc823ecc236c7168ba6ea39.zip
net.resolvers.service: Fix sorting SRV record
-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 92c46308..0ce4a5cb 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.priority > b.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