diff options
author | Waqas Hussain <waqas20@gmail.com> | 2009-10-25 21:21:25 +0500 |
---|---|---|
committer | Waqas Hussain <waqas20@gmail.com> | 2009-10-25 21:21:25 +0500 |
commit | 60087d4680a0804c9e5c6fdb4ec236f8f5096012 (patch) | |
tree | ef63d2bccaea558ef227793850acc1fb91651031 | |
parent | 1580c8c12baa2d40e5e51c5d4139d6be3cba4138 (diff) | |
download | prosody-60087d4680a0804c9e5c6fdb4ec236f8f5096012.tar.gz prosody-60087d4680a0804c9e5c6fdb4ec236f8f5096012.zip |
mod_console: Added proper cleanup for disconnected console sessions.
-rw-r--r-- | plugins/mod_console.lua | 6 |
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); |