Software /
code /
prosody
Diff
plugins/mod_component.lua @ 4541:05f5ec99da77
Merge with trunk
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sun, 22 Jan 2012 22:55:49 +0000 |
parent | 4464:b0574fc78a0a |
child | 4650:464ca74ddf6a |
line wrap: on
line diff
--- a/plugins/mod_component.lua Sat Dec 10 17:21:19 2011 +0000 +++ b/plugins/mod_component.lua Sun Jan 22 22:55:49 2012 +0000 @@ -10,8 +10,6 @@ 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 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 @@ -- 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;