Changeset

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
parents 9396:f57fc24aa0dd
children 9398:7f8ba13b4dd6
files net/resolvers/service.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
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