mod_c2s: Fix session:close() when a stanza is passed as reason

This commit is contained in:
Kim Alvefur 2013-05-10 22:29:03 +02:00
parent 8124de1f0e
commit dd56030a23

View file

@ -157,7 +157,7 @@ local function session_close(session, reason)
session.send("</stream:stream>");
function session.send() return false; end
local reason = (reason and (reason.text or reason.condition)) or reason;
local reason = (reason and (reason.name or reason.text or reason.condition)) or reason;
session.log("info", "c2s stream for %s closed: %s", session.full_jid or ("<"..session.ip..">"), reason or "session closed");
-- Authenticated incoming stream may still be sending us stanzas, so wait for </stream:stream> from remote