aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2012-04-22 16:35:26 +0100
committerMatthew Wild <mwild1@gmail.com>2012-04-22 16:35:26 +0100
commit67f1c12639abc5053bda02077abba5bf02ca0c2f (patch)
tree2c4cd8df96e861f9606f711bccf0c5bcdc9cb32b
parentd74cf643a6dc8f0eb12a8af4eba82f944c41aaf8 (diff)
downloadprosody-67f1c12639abc5053bda02077abba5bf02ca0c2f.tar.gz
prosody-67f1c12639abc5053bda02077abba5bf02ca0c2f.zip
mod_component: Handle component connecting to non-existent host
-rw-r--r--plugins/mod_component.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_component.lua b/plugins/mod_component.lua
index 96d55e40..5b1eefc7 100644
--- a/plugins/mod_component.lua
+++ b/plugins/mod_component.lua
@@ -149,7 +149,7 @@ function stream_callbacks.error(session, error, data, data2)
end
function stream_callbacks.streamopened(session, attr)
- if not hosts[attr.to].modules.component then
+ if not hosts[attr.to] or not hosts[attr.to].modules.component then
session:close{ condition = "host-unknown", text = tostring(attr.to).." does not match any configured external components" };
return;
end