plugins/mod_c2s.lua
changeset 8823 1348a931528a
parent 8767 81d305bbe7bc
parent 8822 780d728f969f
child 8850 74526c425dec
equal deleted inserted replaced
8821:c96c00dc424b 8823:1348a931528a
   170 
   170 
   171 		session.send("</stream:stream>");
   171 		session.send("</stream:stream>");
   172 		function session.send() return false; end
   172 		function session.send() return false; end
   173 
   173 
   174 		local reason_text = (reason and (reason.name or reason.text or reason.condition)) or reason;
   174 		local reason_text = (reason and (reason.name or reason.text or reason.condition)) or reason;
   175 		session.log("debug", "c2s stream for %s closed: %s", session.full_jid or ("<"..session.ip..">"), reason_text or "session closed");
   175 		session.log("debug", "c2s stream for %s closed: %s", session.full_jid or session.ip or "<unknown>", reason_text or "session closed");
   176 
   176 
   177 		-- Authenticated incoming stream may still be sending us stanzas, so wait for </stream:stream> from remote
   177 		-- Authenticated incoming stream may still be sending us stanzas, so wait for </stream:stream> from remote
   178 		local conn = session.conn;
   178 		local conn = session.conn;
   179 		if reason_text == nil and not session.notopen and session.type == "c2s" then
   179 		if reason_text == nil and not session.notopen and session.type == "c2s" then
   180 			-- Grace time to process data from authenticated cleanly-closed stream
   180 			-- Grace time to process data from authenticated cleanly-closed stream