Software /
code /
prosody
Diff
net/resolvers/service.lua @ 9396:f57fc24aa0dd
net.resolvers.service: Fix sorting SRV record
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 30 Sep 2018 12:51:34 +0200 |
parent | 9395:794eda565c69 |
child | 9397:e09ddd061ec4 |
line wrap: on
line diff
--- a/net/resolvers/service.lua Sat Sep 29 23:04:53 2018 +0200 +++ b/net/resolvers/service.lua Sun Sep 30 12:51:34 2018 +0200 @@ -47,7 +47,7 @@ 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