diff options
author | Kim Alvefur <zash@zash.se> | 2016-04-03 15:18:21 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2016-04-03 15:18:21 +0200 |
commit | 71cd96efa7f28656fd61354755b30f9054c238ea (patch) | |
tree | 83905bf1d9fbc0c370cbad3da77c71be2ca22032 | |
parent | 16d0cbe6a706a0803a2ebe1f0bb43db76d1bacfd (diff) | |
download | prosody-71cd96efa7f28656fd61354755b30f9054c238ea.tar.gz prosody-71cd96efa7f28656fd61354755b30f9054c238ea.zip |
mod_c2s: Just destroy the session when it has no connection (see #641)
-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 30a017c0..2bb919f8 100644 --- a/plugins/mod_c2s.lua +++ b/plugins/mod_c2s.lua @@ -175,6 +175,9 @@ local function session_close(session, reason) sm_destroy_session(session, reason); conn:close(); end + else + local reason = (reason and (reason.name or reason.text or reason.condition)) or reason; + sm_destroy_session(session, reason); end end |