diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/s2smanager.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/core/s2smanager.lua b/core/s2smanager.lua index 8fa97c49..cd381308 100644 --- a/core/s2smanager.lua +++ b/core/s2smanager.lua @@ -125,7 +125,10 @@ function send_to_host(from_host, to_host, data) log("debug", "stanza [%s] queued until connection complete", tostring(data.name)); if (not host_session.connecting) and (not host_session.conn) then log("warn", "Connection to %s failed already, destroying session...", to_host); - destroy_session(host_session); + if not destroy_session(host_session, "Connection failed") then + -- Already destroyed, we need to bounce our stanza + bounce_sendq(host_session, host_session.destruction_reason); + end return false; end end |