Software /
code /
prosody
Diff
net/resolvers/service.lua @ 9397:e09ddd061ec4
net.resolvers.service: Sort SRV records in correct direction
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 30 Sep 2018 13:02:46 +0200 |
parent | 9396:f57fc24aa0dd |
child | 9691:e11e076f0eb8 |
child | 10384:94c9c574cd8a |
line wrap: on
line diff
--- a/net/resolvers/service.lua Sun Sep 30 12:51:34 2018 +0200 +++ b/net/resolvers/service.lua Sun Sep 30 13:02:46 2018 +0200 @@ -47,7 +47,7 @@ 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