mod_s2s: Reset secure flag on new connection attempt
authorKim Alvefur <zash@zash.se>
Mon, 25 Mar 2013 18:08:15 +0000 (19:08 +0100)
committerKim Alvefur <zash@zash.se>
Mon, 25 Mar 2013 18:08:15 +0000 (19:08 +0100)
plugins/mod_s2s/s2sout.lib.lua

index f89c5fc412afd3ec7ea87377bf4cd27e528af178..a22846dbe73407046468a6123389141e0842ef94 100644 (file)
@@ -271,6 +271,10 @@ function s2sout.make_connect(host_session, connect_host, connect_port)
        
        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();