aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 42c35689..a690e9be 100644
--- a/plugins/mod_c2s.lua
+++ b/plugins/mod_c2s.lua
@@ -178,6 +178,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