Software /
code /
prosody-modules
Changeset
295:e373de5907aa
mod_admin_web: Only create the node once when loading onto multiple hosts
author | Florian Zeitz <florob@babelmonkeys.de> |
---|---|
date | Fri, 24 Dec 2010 01:59:28 +0100 |
parents | 294:5a619d6045a8 |
children | 296:d49702971a5e |
files | mod_admin_web/admin_web/mod_admin_web.lua |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_admin_web/admin_web/mod_admin_web.lua Thu Dec 23 22:40:58 2010 +0100 +++ b/mod_admin_web/admin_web/mod_admin_web.lua Fri Dec 24 01:59:28 2010 +0100 @@ -118,9 +118,11 @@ local host_session = prosody.hosts[host]; local http_conf = config.get("*", "core", "webadmin_http_ports"); - local ok, errmsg = hosts[service].modules.pubsub.service:create(xmlns_sessions, service); - if not ok then - error("Could not create node: " .. tostring(errmsg)); + if not select(2, hosts[service].modules.pubsub.service:get_nodes(service))[xmlns_sessions] then + local ok, errmsg = hosts[service].modules.pubsub.service:create(xmlns_sessions, service); + if not ok then + error("Could not create node: " .. tostring(errmsg)); + end end for remotehost, session in pairs(host_session.s2sout) do