Changeset

9836:e487197ba8a5

core.portmanager: Use server.listen API
author Kim Alvefur <zash@zash.se>
date Thu, 13 Sep 2018 21:17:37 +0200
parents 9835:20bf5b47c1fb
children 9837:789395f027f1
files core/portmanager.lua
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/core/portmanager.lua	Thu Sep 13 21:16:37 2018 +0200
+++ b/core/portmanager.lua	Thu Sep 13 21:17:37 2018 +0200
@@ -126,7 +126,11 @@
 				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));