ashb commented on code in PR #26222:
URL: https://github.com/apache/airflow/pull/26222#discussion_r965656468


##########
airflow/utils/serve_logs.py:
##########
@@ -143,13 +144,14 @@ def serve_logs():
 
     worker_log_server_port = conf.getint('logging', 'WORKER_LOG_SERVER_PORT')
 
-    # Make sure to have both an IPv4 and an IPv6 interface.
-    # Gunicorn can bind multiple addresses, see 
https://docs.gunicorn.org/en/stable/settings.html#bind.
-    options = [
-        GunicornOption("bind", f"0.0.0.0:{worker_log_server_port}"),
-        GunicornOption("bind", f"[::]:{worker_log_server_port}"),
-        GunicornOption("workers", 2),
-    ]
+    # If dual stack is available and IPV6_V6ONLY is not enabled on the socket
+    # then when IPV6 is bound to it will also bind to IPV4 automatically
+    if getattr(socket, "has_dualstack_ipv6", bool)():

Review Comment:
   ```suggestion
       if getattr(socket, "has_dualstack_ipv6", False)():
   ```



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to