Changeset

3578:410d2df8a824

net.xmppcomponent_listener: Call session:on_destroy() on session disconnect.
author Waqas Hussain <waqas20@gmail.com>
date Tue, 09 Nov 2010 20:22:08 +0500
parents 3577:2cc135cba25b
children 3579:9720fa5e0991
files net/xmppcomponent_listener.lua
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/net/xmppcomponent_listener.lua	Tue Nov 09 01:19:17 2010 +0500
+++ b/net/xmppcomponent_listener.lua	Tue Nov 09 20:22:08 2010 +0500
@@ -203,6 +203,7 @@
 	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);