membphis commented on a change in pull request #1085: Modify bin/apisix to support the SO_REUSEPORT URL: https://github.com/apache/incubator-apisix/pull/1085#discussion_r368345746
########## File path: bin/apisix ########## @@ -128,13 +128,26 @@ stream { } server { + {% if enable_reuseport then %} + + {% for _, port in ipairs(stream_proxy.tcp or {}) do %} + listen {*port*} reuseport; + {% end %} + {% for _, port in ipairs(stream_proxy.udp or {}) do %} + listen {*port*} udp reuseport; + {% end %} + + {% else %} {% --if enable_reuseport %} + {% for _, port in ipairs(stream_proxy.tcp or {}) do %} listen {*port*}; Review comment: `listen {*port*} {% if enable_reuseport then %} reuseport {% end %};` This style is simpler. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services