# HG changeset patch # User Kim Alvefur # Date 1538305366 -7200 # Node ID e09ddd061ec461f35adb16752afba6b4b14a818a # Parent f57fc24aa0dda2c3592ba39279cc13777998988d net.resolvers.service: Sort SRV records in correct direction diff -r f57fc24aa0dd -r e09ddd061ec4 net/resolvers/service.lua --- 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