aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_c2s.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2016-04-03 15:18:21 +0200
committerKim Alvefur <zash@zash.se>2016-04-03 15:18:21 +0200
commit4ae4d1e53d3618ad24a6ee2811784151878e4170 (patch)
tree83905bf1d9fbc0c370cbad3da77c71be2ca22032 /plugins/mod_c2s.lua
parent31c0a34728dfc3f72cb7fe2072929c339f3625cf (diff)
downloadprosody-4ae4d1e53d3618ad24a6ee2811784151878e4170.tar.gz
prosody-4ae4d1e53d3618ad24a6ee2811784151878e4170.zip
mod_c2s: Just destroy the session when it has no connection (see #641)
Diffstat (limited to 'plugins/mod_c2s.lua')
-rw-r--r--plugins/mod_c2s.lua3
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