Changeset

3505:eb2f36dc0369

net.xmppcomponent_listener: Fixed a possible traceback in component disconnect handling.
author Waqas Hussain <waqas20@gmail.com>
date Tue, 21 Sep 2010 18:28:06 +0500
parents 3504:adbb015b237e
children 3506:0f46acca11cc 3507:b639042bb0d5
files net/xmppcomponent_listener.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/net/xmppcomponent_listener.lua	Tue Sep 21 17:46:59 2010 +0500
+++ b/net/xmppcomponent_listener.lua	Tue Sep 21 18:28:06 2010 +0500
@@ -203,7 +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.host then
+		if hosts[session.host] then
 			log("debug", "Deregistering component");
 			cm_deregister_component(session.host);
 			hosts[session.host].connected = nil;