Diff

net/resolvers/service.lua @ 9394:bcd94cc355d3

net.resolvers.service: Add support for fallback to bare domain and default port The default port must be configured separately to enable this behavior
author Kim Alvefur <zash@zash.se>
date Sat, 29 Sep 2018 22:03:16 +0200
parent 9393:e2733f504d9e
child 9395:794eda565c69
line wrap: on
line diff
--- a/net/resolvers/service.lua	Sat Sep 29 22:02:36 2018 +0200
+++ b/net/resolvers/service.lua	Sat Sep 29 22:03:16 2018 +0200
@@ -35,6 +35,9 @@
 	dns_resolver:lookup(function (answer)
 		if answer then
 			if #answer == 0 then
+				if self.extra and self.extra.default_port then
+					table.insert(targets, { self.domain, self.extra.default_port, self.conn_type, self.extra });
+				end
 				ready();
 				return;
 			end