mod_s2s: Reset secure flag on new connection attempt
authorKim Alvefur <zash@zash.se>
Mon, 25 Mar 2013 19:08:15 +0100
changeset 5388 f833d2188c16
parent 5387 1130887e0d41
child 5389 d147a4227a72
mod_s2s: Reset secure flag on new connection attempt
plugins/mod_s2s/s2sout.lib.lua
--- a/plugins/mod_s2s/s2sout.lib.lua	Mon Mar 25 08:18:49 2013 +0100
+++ b/plugins/mod_s2s/s2sout.lib.lua	Mon Mar 25 19:08:15 2013 +0100
@@ -271,6 +271,10 @@
 	
 	local from_host, to_host = host_session.from_host, host_session.to_host;
 	
+	-- Reset secure flag in case this is another
+	-- connection attempt after a failed STARTTLS
+	host_session.secure = nil;
+
 	local conn, handler;
 	if connect_host.proto == "IPv4" then
 		conn, handler = socket.tcp();