aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorMarco Cirillo <maranda@lightwitch.org>2012-01-06 21:45:33 +0000
committerMarco Cirillo <maranda@lightwitch.org>2012-01-06 21:45:33 +0000
commitb70702ed03c381f5da90f101f7663d511b2e4e8d (patch)
tree380bbb0e48b940c715b734400d6825c0a67db67e /plugins
parentc5693a2483a30f7aab76a2c225b66a0033a92b5c (diff)
downloadprosody-b70702ed03c381f5da90f101f7663d511b2e4e8d.tar.gz
prosody-b70702ed03c381f5da90f101f7663d511b2e4e8d.zip
mod_component: removed unused variable reference, added "flagging" to assert if a component is connected or not.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_component.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/mod_component.lua b/plugins/mod_component.lua
index 97c46a8c..f7d09930 100644
--- a/plugins/mod_component.lua
+++ b/plugins/mod_component.lua
@@ -10,8 +10,6 @@ if module:get_host_type() ~= "component" then
error("Don't load mod_component manually, it should be for a component, please see http://prosody.im/doc/components", 0);
end
-local hosts = _G.hosts;
-
local t_concat = table.concat;
local sha1 = require "util.hashes".sha1;
@@ -23,6 +21,7 @@ local main_session, send;
local function on_destroy(session, err)
if main_session == session then
+ connected = false;
main_session = nil;
send = nil;
session.on_destroy = nil;
@@ -83,6 +82,7 @@ function handle_component_auth(event)
-- If component not already created for this host, create one now
if not main_session then
+ connected = true;
send = session.send;
main_session = session;
session.on_destroy = on_destroy;