Software /
code /
prosody
Comparison
plugins/mod_c2s.lua @ 8819:780d728f969f
mod_c2s: Avoid concatenating potential nil value (fixes #753)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 22 May 2018 22:22:57 +0200 |
parent | 8388:9ee56e9ad47a |
child | 8820:1348a931528a |
child | 8846:7ec098b68042 |
comparison
equal
deleted
inserted
replaced
8795:aaff40ec7001 | 8819:780d728f969f |
---|---|
166 | 166 |
167 session.send("</stream:stream>"); | 167 session.send("</stream:stream>"); |
168 function session.send() return false; end | 168 function session.send() return false; end |
169 | 169 |
170 local reason_text = (reason and (reason.name or reason.text or reason.condition)) or reason; | 170 local reason_text = (reason and (reason.name or reason.text or reason.condition)) or reason; |
171 session.log("debug", "c2s stream for %s closed: %s", session.full_jid or ("<"..session.ip..">"), reason_text or "session closed"); | 171 session.log("debug", "c2s stream for %s closed: %s", session.full_jid or session.ip or "<unknown>", reason_text or "session closed"); |
172 | 172 |
173 -- Authenticated incoming stream may still be sending us stanzas, so wait for </stream:stream> from remote | 173 -- Authenticated incoming stream may still be sending us stanzas, so wait for </stream:stream> from remote |
174 local conn = session.conn; | 174 local conn = session.conn; |
175 if reason_text == nil and not session.notopen and session.type == "c2s" then | 175 if reason_text == nil and not session.notopen and session.type == "c2s" then |
176 -- Grace time to process data from authenticated cleanly-closed stream | 176 -- Grace time to process data from authenticated cleanly-closed stream |