lib/fluent/plugin/output_node.rb in fluent-plugin-secure-forward-0.4.0 vs lib/fluent/plugin/output_node.rb in fluent-plugin-secure-forward-0.4.1

- old
+ new

@@ -328,11 +328,11 @@ @mtime = Time.now loop do break if @detach - break if Time.now > @mtime + @connection_hard_timeout + break if @connection_hard_timeout && Time.now > @mtime + @connection_hard_timeout begin while @sslsession.read_nonblock(read_length, buf) if buf == '' sleep read_interval @@ -343,10 +343,10 @@ buf = '' end rescue OpenSSL::SSL::SSLError => e # to wait i/o restart log.trace "SSLError", error_class: e.class, error: e, mtime: @mtime, host: @host, port: @port - if Time.now > @mtime + @connection_hard_timeout + if @connection_hard_timeout && Time.now > @mtime + @connection_hard_timeout log.warn "connection hard timeout", mtime: @mtime, timeout: @connection_hard_timeout, host: @host, port: @port log.warn "aborting connection", host: @host, port: @port self.release! self.detach! break