aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-09-13 21:17:37 +0200
committerKim Alvefur <zash@zash.se>2018-09-13 21:17:37 +0200
commit781d8a4868990c95aca244c18335555fabaec85b (patch)
tree6b8f8d34527c78ce707358ea06bc0aff1b9fde00 /core
parent3cb132326dd6489e14a26071f87d68bf277a5a70 (diff)
downloadprosody-781d8a4868990c95aca244c18335555fabaec85b.tar.gz
prosody-781d8a4868990c95aca244c18335555fabaec85b.zip
core.portmanager: Use server.listen API
Diffstat (limited to 'core')
-rw-r--r--core/portmanager.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/portmanager.lua b/core/portmanager.lua
index 1ed37da0..cf836634 100644
--- a/core/portmanager.lua
+++ b/core/portmanager.lua
@@ -126,7 +126,11 @@ local function activate(service_name)
end
if not err then
-- Start listening on interface+port
- local handler, err = server.addserver(interface, port_number, listener, mode, ssl);
+ local handler, err = server.listen(interface, port_number, listener, {
+ read_size = mode,
+ tls_ctx = ssl,
+ tls_direct = service_info.encryption == "ssl";
+ });
if not handler then
log("error", "Failed to open server port %d on %s, %s", port_number, interface,
error_to_friendly_message(service_name, port_number, err));