aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
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
commitc1e2674fd4b5dd08abe07e9f3bbf92d34c096c56 (patch)
tree2c4cd8df96e861f9606f711bccf0c5bcdc9cb32b /plugins
parent51ab962e5540b1af96170b7801135f768f4c75cf (diff)
downloadprosody-c1e2674fd4b5dd08abe07e9f3bbf92d34c096c56.tar.gz
prosody-c1e2674fd4b5dd08abe07e9f3bbf92d34c096c56.zip
mod_component: Handle component connecting to non-existent host
Diffstat (limited to 'plugins')
-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