aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2010-11-09 20:22:08 +0500
committerWaqas Hussain <waqas20@gmail.com>2010-11-09 20:22:08 +0500
commitdbde1c7ea112a2a9284fd90a0010efa5327f8b03 (patch)
treef6680f6d75dc22ac29d58838c3f28da6020eb87c
parent366230127ae1ecdd34709b59c2ecc3d43762d5a0 (diff)
downloadprosody-dbde1c7ea112a2a9284fd90a0010efa5327f8b03.tar.gz
prosody-dbde1c7ea112a2a9284fd90a0010efa5327f8b03.zip
net.xmppcomponent_listener: Call session:on_destroy() on session disconnect.
-rw-r--r--net/xmppcomponent_listener.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/xmppcomponent_listener.lua b/net/xmppcomponent_listener.lua
index a96a1cff..4f1cda4c 100644
--- a/net/xmppcomponent_listener.lua
+++ b/net/xmppcomponent_listener.lua
@@ -203,6 +203,7 @@ function component_listener.ondisconnect(conn, err)
local session = sessions[conn];
if session then
(session.log or log)("info", "component disconnected: %s (%s)", tostring(session.host), tostring(err));
+ if session.on_destroy then session:on_destroy(err); end
if hosts[session.host] then
log("debug", "Deregistering component");
cm_deregister_component(session.host);