diff options
author | Matthew Wild <mwild1@gmail.com> | 2012-03-14 21:43:46 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2012-03-14 21:43:46 +0000 |
commit | 16c3e94d0fecaeb4cc91cfe8c1c5cc0832116664 (patch) | |
tree | fa62c1cd2dd6df9bc529ae0d67fddde266b1908b | |
parent | 829f9e222487d456c88f9624f613bdd37a9f80dd (diff) | |
download | prosody-16c3e94d0fecaeb4cc91cfe8c1c5cc0832116664.tar.gz prosody-16c3e94d0fecaeb4cc91cfe8c1c5cc0832116664.zip |
mod_s2s/s2sout.lib: Log message instead of traceback when s2s isn't configured for any ports
-rw-r--r-- | plugins/s2s/s2sout.lib.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/s2s/s2sout.lib.lua b/plugins/s2s/s2sout.lib.lua index f9f9d362..6ee1ca83 100644 --- a/plugins/s2s/s2sout.lib.lua +++ b/plugins/s2s/s2sout.lib.lua @@ -316,7 +316,10 @@ module:hook_global("service-added", function (event) if event.name ~= "s2s" then return end local s2s_sources = portmanager.get_active_services():get("s2s"); - + if not s2s_sources then + module:log("warn", "s2s not listening on any ports, outgoing connections may fail"); + return; + end for source, _ in pairs(s2s_sources) do if source == "*" or source == "0.0.0.0" then if not socket.local_addresses then |