From dbde1c7ea112a2a9284fd90a0010efa5327f8b03 Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Tue, 9 Nov 2010 20:22:08 +0500 Subject: net.xmppcomponent_listener: Call session:on_destroy() on session disconnect. --- net/xmppcomponent_listener.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'net') 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); -- cgit v1.2.3