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