# HG changeset patch # User Waqas Hussain # Date 1289316128 -18000 # Node ID 410d2df8a824fa69e595c82f21571fe6bc42d96a # Parent 2cc135cba25b8f0799a188b1c3e6890136a85f72 net.xmppcomponent_listener: Call session:on_destroy() on session disconnect. diff -r 2cc135cba25b -r 410d2df8a824 net/xmppcomponent_listener.lua --- 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);