Skip to content

Commit

Permalink
Merge pull request #2959 from fluent/disable-linger-timeout-specifica…
Browse files Browse the repository at this point in the history
…tion-on-windows

windows: Disable specifying linger_timeout again
  • Loading branch information
cosmo0920 committed Apr 20, 2020
2 parents a5badcd + 8f729c5 commit 1dfdb0b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/fluent/plugin/out_forward.rb
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,12 @@ def create_transfer_socket(host, port, hostname, &block)
cert_logical_store_name: @tls_cert_logical_store_name,
cert_use_enterprise_store: @tls_cert_use_enterprise_store,

linger_timeout: @send_timeout,
# Enabling SO_LINGER causes tcp port exhaustion on Windows.
# This is because dynamic ports are only 16384 (from 49152 to 65535) and
# expiring SO_LINGER enabled ports should wait 4 minutes
# where set by TcpTimeDelay. Its default value is 4 minutes.
# So, we should disable SO_LINGER on Windows to prevent flood of waiting ports.
linger_timeout: Fluent.windows? ? nil : @send_timeout,
send_timeout: @send_timeout,
recv_timeout: @ack_response_timeout,
connect_timeout: @connect_timeout,
Expand Down

0 comments on commit 1dfdb0b

Please sign in to comment.