From 30e384b6f629033b49c3d304f31079b508a9ef27 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Sun, 14 Mar 2010 03:07:05 +0000 Subject: net.xmppcomponent_listener: Don't remove 'log' and 'close' from sessions when destroying, and set destroyed = true --- net/xmppcomponent_listener.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'net') 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 -- cgit v1.2.3