Changeset

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
parents 6916:d0ab0069145f
children 6918:de35feccc78e
files plugins/mod_s2s/s2sout.lib.lua
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
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