Diff

plugins/mod_s2s/s2sout.lib.lua @ 6917:65344c3bae7a

mod_s2s/s2sout: Keep SRV lookup response around even if it's empty
author Kim Alvefur <zash@zash.se>
date Thu, 05 Nov 2015 13:54:35 +0100
parent 6685:3f05b255937f
child 7098:5286e79c6829
line wrap: on
line diff
--- a/plugins/mod_s2s/s2sout.lib.lua	Thu Nov 05 13:35:16 2015 +0100
+++ b/plugins/mod_s2s/s2sout.lib.lua	Thu Nov 05 13:54:35 2015 +0100
@@ -103,11 +103,12 @@
 		local handle;
 		handle = adns.lookup(function (answer)
 			handle = nil;
+			local srv_hosts = { answer = answer };
+			host_session.srv_hosts = srv_hosts;
+			host_session.srv_choice = 0;
 			host_session.connecting = nil;
 			if answer and #answer > 0 then
 				log("debug", "%s has SRV records, handling...", to_host);
-				local srv_hosts = { answer = answer };
-				host_session.srv_hosts = srv_hosts;
 				for _, record in ipairs(answer) do
 					t_insert(srv_hosts, record.srv);
 				end