aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2010-03-14 03:07:05 +0000
committerMatthew Wild <mwild1@gmail.com>2010-03-14 03:07:05 +0000
commit30e384b6f629033b49c3d304f31079b508a9ef27 (patch)
tree697417ad96b0e631039bcc5e338822a94b61638b
parenta81dc4028b418c0374bbdb56583b40472dbe8693 (diff)
downloadprosody-30e384b6f629033b49c3d304f31079b508a9ef27.tar.gz
prosody-30e384b6f629033b49c3d304f31079b508a9ef27.zip
net.xmppcomponent_listener: Don't remove 'log' and 'close' from sessions when destroying, and set destroyed = true
-rw-r--r--net/xmppcomponent_listener.lua7
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