aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2012-03-14 21:43:46 +0000
committerMatthew Wild <mwild1@gmail.com>2012-03-14 21:43:46 +0000
commit437ed35fad3be0ce72b97400dfc765c370e3cf2b (patch)
treefa62c1cd2dd6df9bc529ae0d67fddde266b1908b /plugins
parent107458131fbd723e4a0bf486000afd61fdcc9824 (diff)
downloadprosody-437ed35fad3be0ce72b97400dfc765c370e3cf2b.tar.gz
prosody-437ed35fad3be0ce72b97400dfc765c370e3cf2b.zip
mod_s2s/s2sout.lib: Log message instead of traceback when s2s isn't configured for any ports
Diffstat (limited to 'plugins')
-rw-r--r--plugins/s2s/s2sout.lib.lua5
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