Changeset

2353:54e650624ded

prosody: Use the multiplex listener when the 'ports' config option is specified.
author Waqas Hussain <waqas20@gmail.com>
date Thu, 10 Dec 2009 05:08:59 +0500
parents 2352:a7ef564271a5
children 2354:5a00668ba0ab
files prosody
diffstat 1 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/prosody	Thu Dec 10 05:07:32 2009 +0500
+++ b/prosody	Thu Dec 10 05:08:59 2009 +0500
@@ -286,10 +286,14 @@
 	prosody.events.fire_event("server-starting");
 
 	-- start listening on sockets
-	prosody.net_activate_ports("c2s", "xmppclient", {5222});
-	prosody.net_activate_ports("s2s", "xmppserver", {5269});
-	prosody.net_activate_ports("component", "xmppcomponent", {}, "tcp");
-	prosody.net_activate_ports("legacy_ssl", "xmppclient", {}, "ssl");
+	if config.get("*", "core", "ports") then
+		prosody.net_activate_ports(nil, "multiplex", {5222, 5269});
+	else
+		prosody.net_activate_ports("c2s", "xmppclient", {5222});
+		prosody.net_activate_ports("s2s", "xmppserver", {5269});
+		prosody.net_activate_ports("component", "xmppcomponent", {}, "tcp");
+		prosody.net_activate_ports("legacy_ssl", "xmppclient", {}, "ssl");
+	end
 
 	prosody.start_time = os.time();
 end