From 29b51764662c31cebcbfd417b3282e52c0e1fa8f Mon Sep 17 00:00:00 2001 From: Masahiro Nakagawa Date: Fri, 15 Nov 2019 11:23:42 +0900 Subject: [PATCH] server helper: Update comment and code Signed-off-by: Masahiro Nakagawa --- lib/fluent/plugin_helper/server.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/fluent/plugin_helper/server.rb b/lib/fluent/plugin_helper/server.rb index be83dadc15..7b9cea0649 100644 --- a/lib/fluent/plugin_helper/server.rb +++ b/lib/fluent/plugin_helper/server.rb @@ -355,8 +355,9 @@ def server_create_tcp_socket(shared, bind, port) sock = if shared server_socket_manager_client.listen_tcp(bind, port) else - # TCPServer.new doesn't set IPV6_V6ONLY flag, so use tcp_server_sockets instead. - tsock = Addrinfo.tcp(bind, port).listen(::Socket::SOMAXCONN) + # TCPServer.new doesn't set IPV6_V6ONLY flag, so use Addrinfo class instead. + # backlog will be set by the caller, we don't need to set backlog here + tsock = Addrinfo.tcp(bind, port).listen tsock.autoclose = false TCPServer.for_fd(tsock.fileno) end