diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mod_c2s.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/mod_c2s.lua b/plugins/mod_c2s.lua index 8a7c8306..204ac16d 100644 --- a/plugins/mod_c2s.lua +++ b/plugins/mod_c2s.lua @@ -190,6 +190,9 @@ local function session_close(session, reason) if session.notopen then session:open_stream(); end + local close_event_payload = { session = session, reason = reason }; + module:context(session.host):fire_event("pre-session-close", close_event_payload); + reason = close_event_payload.reason; if reason then -- nil == no err, initiated by us, false == initiated by client local stream_error = st.stanza("stream:error"); if type(reason) == "string" then -- assume stream error |