Software /
code /
prosody
Comparison
plugins/mod_bosh.lua @ 8743:81929cfe7f86
mod_bosh: Improve logging on session close (reason may be a table with params)
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Tue, 10 Apr 2018 20:25:12 +0100 |
parent | 8594:b4a0bc46c82d |
child | 8744:0f4a4d8ac3dd |
comparison
equal
deleted
inserted
replaced
8742:71939a65961e | 8743:81929cfe7f86 |
---|---|
208 local function bosh_reset_stream(session) session.notopen = true; end | 208 local function bosh_reset_stream(session) session.notopen = true; end |
209 | 209 |
210 local stream_xmlns_attr = { xmlns = "urn:ietf:params:xml:ns:xmpp-streams" }; | 210 local stream_xmlns_attr = { xmlns = "urn:ietf:params:xml:ns:xmpp-streams" }; |
211 | 211 |
212 local function bosh_close_stream(session, reason) | 212 local function bosh_close_stream(session, reason) |
213 (session.log or log)("info", "BOSH client disconnected"); | 213 (session.log or log)("info", "BOSH client disconnected: %s", tostring((reason and reason.condition or reason) or "session close")); |
214 | 214 |
215 local close_reply = st.stanza("body", { xmlns = xmlns_bosh, type = "terminate", | 215 local close_reply = st.stanza("body", { xmlns = xmlns_bosh, type = "terminate", |
216 ["xmlns:stream"] = xmlns_streams }); | 216 ["xmlns:stream"] = xmlns_streams }); |
217 | 217 |
218 | 218 |