Skip to content

Commit

Permalink
Merge pull request #1925 from fluent/handle-eoferror-for-tls-ack
Browse files Browse the repository at this point in the history
out_forward: The node should be disabled when TLS socket for ack returns an error. Fix #1923
  • Loading branch information
repeatedly authored Apr 4, 2018
2 parents fb3178d + 1e42bf9 commit b0dc79e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/fluent/plugin/out_forward.rb
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ def on_heartbeat(sockaddr, msg)
def read_ack_from_sock(sock, unpacker)
begin
raw_data = sock.instance_of?(Fluent::PluginHelper::Socket::WrappedSocket::TLS) ? sock.readpartial(@read_length) : sock.recv(@read_length)
rescue Errno::ECONNRESET
rescue Errno::ECONNRESET, EOFError # ECONNRESET for #recv, #EOFError for #readpartial
raw_data = ""
end
info = @sock_ack_waiting_mutex.synchronize{ @sock_ack_waiting.find{|i| i.sock == sock } }
Expand Down

0 comments on commit b0dc79e

Please sign in to comment.