Diff

plugins/mod_c2s.lua @ 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
parent 7221:56e65b1e54e8
child 7329:ab811c1bb730
child 8232:176b7f4e4ac9
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