aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_console.lua
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2009-10-25 21:21:25 +0500
committerWaqas Hussain <waqas20@gmail.com>2009-10-25 21:21:25 +0500
commit60087d4680a0804c9e5c6fdb4ec236f8f5096012 (patch)
treeef63d2bccaea558ef227793850acc1fb91651031 /plugins/mod_console.lua
parent1580c8c12baa2d40e5e51c5d4139d6be3cba4138 (diff)
downloadprosody-60087d4680a0804c9e5c6fdb4ec236f8f5096012.tar.gz
prosody-60087d4680a0804c9e5c6fdb4ec236f8f5096012.zip
mod_console: Added proper cleanup for disconnected console sessions.
Diffstat (limited to 'plugins/mod_console.lua')
-rw-r--r--plugins/mod_console.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/mod_console.lua b/plugins/mod_console.lua
index a46eec12..5a092298 100644
--- a/plugins/mod_console.lua
+++ b/plugins/mod_console.lua
@@ -127,7 +127,11 @@ function console_listener.listener(conn, data)
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);