Skip to content

Commit

Permalink
yousali:<fix>set the default value of 'enable_reuseport' in 'config.y…
Browse files Browse the repository at this point in the history
…aml'
  • Loading branch information
Miss-you committed Feb 6, 2020
1 parent 9dfcf34 commit 7dcdeb4
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions bin/apisix
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
Expand Down Expand Up @@ -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
Expand All @@ -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)

Expand Down

0 comments on commit 7dcdeb4

Please sign in to comment.