Software /
code /
prosody
Comparison
plugins/s2s/mod_s2s.lua @ 4621:0445a543ae57
mod_s2s: Don't bounce sendq on failed connections since it's handled by s2smanager
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 11 Mar 2012 21:37:55 +0100 |
parent | 4601:4007b9f9aa5f |
child | 4622:9eccb5a27989 |
comparison
equal
deleted
inserted
replaced
4602:ba898af15de5 | 4621:0445a543ae57 |
---|---|
105 host_session.sendq = { {tostring(stanza), stanza.attr.type ~= "error" and stanza.attr.type ~= "result" and st.reply(stanza)} }; | 105 host_session.sendq = { {tostring(stanza), stanza.attr.type ~= "error" and stanza.attr.type ~= "result" and st.reply(stanza)} }; |
106 log("debug", "stanza [%s] queued until connection complete", tostring(stanza.name)); | 106 log("debug", "stanza [%s] queued until connection complete", tostring(stanza.name)); |
107 s2sout.initiate_connection(host_session); | 107 s2sout.initiate_connection(host_session); |
108 if (not host_session.connecting) and (not host_session.conn) then | 108 if (not host_session.connecting) and (not host_session.conn) then |
109 log("warn", "Connection to %s failed already, destroying session...", to_host); | 109 log("warn", "Connection to %s failed already, destroying session...", to_host); |
110 if not s2s_destroy_session(host_session, "Connection failed") then | 110 s2s_destroy_session(host_session, "Connection failed"); |
111 -- Already destroyed, we need to bounce our stanza | |
112 host_session:bounce_sendq(host_session.destruction_reason); | |
113 end | |
114 return false; | 111 return false; |
115 end | 112 end |
116 return true; | 113 return true; |
117 end, 100); | 114 end, 100); |
118 | 115 |