Changeset

2054:a43aea9b0bd1

mod_console: Added proper cleanup for disconnected console sessions.
author Waqas Hussain <waqas20@gmail.com>
date Sun, 25 Oct 2009 21:21:25 +0500
parents 2053:f5a198127dd3
children 2055:ed3910860d11
files plugins/mod_console.lua
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_console.lua	Sun Oct 25 21:07:32 2009 +0500
+++ b/plugins/mod_console.lua	Sun Oct 25 21:21:25 2009 +0500
@@ -127,7 +127,11 @@
 end
 
 function console_listener.disconnect(conn, err)
-	
+	local session = sessions[conn];
+	if session then
+		session.disconnect();
+		sessions[conn] = nil;
+	end
 end
 
 connlisteners_register('console', console_listener);