Skip to content

Commit 5faccbe

Browse files
committed
Add connect_timeout / resolve_timeout option to TCPSocket.new
Signed-off-by: Shizuo Fujita <[email protected]>
1 parent aa7d3ef commit 5faccbe

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

fluent-logger.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Gem::Specification.new do |gem|
2121
gem.require_paths = ['lib']
2222
gem.license = "Apache-2.0"
2323

24-
gem.required_ruby_version = '>= 2.7'
24+
gem.required_ruby_version = '>= 3.0'
2525

2626
gem.add_dependency "msgpack", ">= 1.0.0", "< 2"
2727

lib/fluent/logger/fluent_logger.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ def create_socket!
173173
if @socket_path
174174
@con = UNIXSocket.new(@socket_path)
175175
else
176-
@con = Socket.tcp(@host, @port, connect_timeout: @connect_timeout, resolv_timeout: @resolv_timeout)
176+
@con = TCPSocket.new(@host, @port, connect_timeout: @connect_timeout, resolv_timeout: @resolv_timeout)
177177
if @tls_options
178178
context = OpenSSL::SSL::SSLContext.new
179179
if @tls_options[:insecure]

0 commit comments

Comments
 (0)