prosody: net_activate_ports: Check listener exists before trying to open port for it

Thu, 23 Jul 2009 21:09:25 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Thu, 23 Jul 2009 21:09:25 +0100
changeset 1583
e17001ce0e9d
parent 1582
80d3d95aa83c
child 1584
ffe8a9296e04

prosody: net_activate_ports: Check listener exists before trying to open port for it

prosody file | annotate | diff | comparison | revisions
--- a/prosody	Thu Jul 23 12:04:41 2009 +0100
+++ b/prosody	Thu Jul 23 21:09:25 2009 +0100
@@ -195,6 +195,7 @@
 	local cl = require "net.connlisteners";
 	-- start listening on sockets
 	function net_activate_ports(option, listener, default, conntype)
+		if not cl.get(listener) then return; end
 		local ports = config.get("*", "core", option.."_ports") or default;
 		if type(ports) == "number" then ports = {ports} end;
 		

mercurial