From bf44e646cde2386f1fc823ecc236c7168ba6ea39 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sun, 30 Sep 2018 12:51:34 +0200 Subject: net.resolvers.service: Fix sorting SRV record --- net/resolvers/service.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net/resolvers/service.lua') 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 -- cgit v1.2.3