diff options
-rw-r--r-- | net/xmppcomponent_listener.lua | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/net/xmppcomponent_listener.lua b/net/xmppcomponent_listener.lua index 7b8ab95a..568d947c 100644 --- a/net/xmppcomponent_listener.lua +++ b/net/xmppcomponent_listener.lua @@ -186,7 +186,12 @@ function component_listener.ondisconnect(conn, err) hosts[session.host].connected = nil; end sessions[conn] = nil; - for k in pairs(session) do session[k] = nil; end + for k in pairs(session) do + if k ~= "log" and k ~= "close" then + session[k] = nil; + end + end + session.destroyed = true; session = nil; end end |