aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2009-12-10 05:08:59 +0500
committerWaqas Hussain <waqas20@gmail.com>2009-12-10 05:08:59 +0500
commit87d8bdbc64e2e4fd5c1db01d7570e83c37293cd2 (patch)
treefe81adbbff6b5adce889f607b17e20c484b08fa4
parentef426e3d1aa4c2ea819ac56b1a95547cd45aae23 (diff)
downloadprosody-87d8bdbc64e2e4fd5c1db01d7570e83c37293cd2.tar.gz
prosody-87d8bdbc64e2e4fd5c1db01d7570e83c37293cd2.zip
prosody: Use the multiplex listener when the 'ports' config option is specified.
-rwxr-xr-xprosody12
1 files changed, 8 insertions, 4 deletions
diff --git a/prosody b/prosody
index c9ff46c4..71d157bf 100755
--- a/prosody
+++ b/prosody
@@ -286,10 +286,14 @@ function prepare_to_start()
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