204 port = tonumber(port); |
204 port = tonumber(port); |
205 if type(port) ~= "number" then |
205 if type(port) ~= "number" then |
206 log("error", "Non-numeric "..ports_option..": "..tostring(port)); |
206 log("error", "Non-numeric "..ports_option..": "..tostring(port)); |
207 else |
207 else |
208 cl.start(listener, { |
208 cl.start(listener, { |
209 ssl = conntype ~= "tcp" and global_ssl_ctx, |
209 ssl = conntype == "ssl" and global_ssl_ctx, |
210 port = port, |
210 port = port, |
211 interface = (option and config.get("*", "core", option.."_interface")) |
211 interface = (option and config.get("*", "core", option.."_interface")) |
212 or cl.get(listener).default_interface |
212 or cl.get(listener).default_interface |
213 or config.get("*", "core", "interface"), |
213 or config.get("*", "core", "interface"), |
214 type = conntype |
214 type = conntype |