# HG changeset patch # User Matthew Wild # Date 1335108926 -3600 # Node ID 9159546cb2f36d0447f0fd4dbf3229dfba09fe82 # Parent 0975505f5a54877dfd05b5c6b6ed32588f624a7a mod_component: Handle component connecting to non-existent host diff -r 0975505f5a54 -r 9159546cb2f3 plugins/mod_component.lua --- a/plugins/mod_component.lua Sun Apr 22 14:54:36 2012 +0100 +++ b/plugins/mod_component.lua Sun Apr 22 16:35:26 2012 +0100 @@ -149,7 +149,7 @@ 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