Changeset

7328:de76ded98b84

mod_c2s: Just destroy the session when it has no connection (see #641)
author Kim Alvefur <zash@zash.se>
date Sun, 03 Apr 2016 15:18:21 +0200 (2016-04-03)
parents 7230:20246b139607
children 7329:ab811c1bb730 7383:69827ee1f951
files plugins/mod_c2s.lua
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_c2s.lua	Thu Mar 03 15:31:46 2016 +0100
+++ b/plugins/mod_c2s.lua	Sun Apr 03 15:18:21 2016 +0200
@@ -175,6 +175,9 @@
 			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