From 4ae4d1e53d3618ad24a6ee2811784151878e4170 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sun, 3 Apr 2016 15:18:21 +0200 Subject: mod_c2s: Just destroy the session when it has no connection (see #641) --- plugins/mod_c2s.lua | 3 +++ 1 file changed, 3 insertions(+) (limited to 'plugins') 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 -- cgit v1.2.3