Software /
code /
prosody
Changeset
4611:8572373fa26f
mod_s2s/s2sout.lib: Log message instead of traceback when s2s isn't configured for any ports
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 14 Mar 2012 21:43:46 +0000 |
parents | 4610:171051f9dd00 |
children | 4612:8bb93860fe46 |
files | plugins/s2s/s2sout.lib.lua |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/s2s/s2sout.lib.lua Wed Mar 14 21:42:08 2012 +0000 +++ b/plugins/s2s/s2sout.lib.lua Wed Mar 14 21:43:46 2012 +0000 @@ -316,7 +316,10 @@ 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