aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2010-09-21 18:28:06 +0500
committerWaqas Hussain <waqas20@gmail.com>2010-09-21 18:28:06 +0500
commitcaf7431d14803b60dca6f4493992cbc537f69536 (patch)
treecd7d5a80bc9f5151d1c3ad0f70f4e1cc16354060
parent3b1c76fc921a298a5adcb081d6336e2553f95d1f (diff)
downloadprosody-caf7431d14803b60dca6f4493992cbc537f69536.tar.gz
prosody-caf7431d14803b60dca6f4493992cbc537f69536.zip
net.xmppcomponent_listener: Fixed a possible traceback in component disconnect handling.
-rw-r--r--net/xmppcomponent_listener.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/xmppcomponent_listener.lua b/net/xmppcomponent_listener.lua
index 5b791e65..6f02b136 100644
--- a/net/xmppcomponent_listener.lua
+++ b/net/xmppcomponent_listener.lua
@@ -203,7 +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.host then
+ if hosts[session.host] then
log("debug", "Deregistering component");
cm_deregister_component(session.host);
hosts[session.host].connected = nil;