# HG changeset patch # User Kim Alvefur # Date 1375484175 -7200 # Node ID 6b344b7e4781bdaddad9e046e6cd2460d41e9f2d # Parent 38e56be1158443ecf4a74c2af7803726205a9fb6 mod_bidi: Allow route/remote event to continue if we couldn't send a stanza (in case the session was destroyed) diff -r 38e56be11584 -r 6b344b7e4781 mod_bidi/mod_bidi.lua --- a/mod_bidi/mod_bidi.lua Sat Aug 03 00:53:09 2013 +0200 +++ b/mod_bidi/mod_bidi.lua Sat Aug 03 00:56:15 2013 +0200 @@ -58,9 +58,9 @@ module:hook("route/remote", function(event) local from_host, to_host, stanza = event.from_host, event.to_host, event.stanza; if from_host ~= module.host then return end - local to_session = bidi_sessions[to_host] + local to_session = bidi_sessions[to_host]; if not to_session or to_session.type ~= "s2sin" then return end - return to_session.sends2s(stanza); + if to_session.send(stanza) then return true end end, -2); -- Incoming s2s