Software /
code /
prosody
Diff
plugins/mod_console.lua @ 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 |
parent | 2010:1a4f14ea39b6 |
child | 2087:5efd79871205 |
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);