From 7dcdeb4d8abf1629bae79ef66bbb0fbfae9753d4 Mon Sep 17 00:00:00 2001 From: Miss-you Date: Thu, 6 Feb 2020 16:54:58 +0800 Subject: [PATCH] yousali:set the default value of 'enable_reuseport' in 'config.yaml' --- bin/apisix | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/bin/apisix b/bin/apisix index 4549ad15263b..76981e88c41a 100755 --- a/bin/apisix +++ b/bin/apisix @@ -261,13 +261,13 @@ http { {% end %} server { - listen {* node_listen *}; + listen {* node_listen *} {% if enable_reuseport then %} reuseport {% end %}; {% if ssl.enable then %} listen {* ssl.listen_port *} ssl {% if ssl.enable_http2 then %} http2 {% end %} {% if enable_reuseport then %} reuseport {% end %}; {% end %} {% if enable_ipv6 then %} - listen [::]:{* node_listen *}; + listen [::]:{* node_listen *} {% if enable_reuseport then %} reuseport {% end %}; {% if ssl.enable then %} listen [::]:{* node_ssl_listen *} ssl {% if ssl.enable_http2 then %} http2 {% end %} {% if enable_reuseport then %} reuseport {% end %}; {% end %} @@ -507,7 +507,6 @@ local function init() with_module_status = with_module_status, node_ssl_listen = 9443, -- default value error_log = {level = "warn"}, - enable_reuseport = true, -- default true } if not yaml_conf.apisix then @@ -531,10 +530,6 @@ local function init() sys_conf["worker_processes"] = "auto" end - if sys_conf["enable_reuseport"] == false then - enable_reuseport = false - end - local conf_render = template.compile(ngx_tpl) local ngxconf = conf_render(sys_conf)