Skip to content

Commit

Permalink
Merge pull request #1602 from fluent/out-forward-dont-stop-heartbeat
Browse files Browse the repository at this point in the history
out_forward: Don't stop heartbeat when error happen
  • Loading branch information
repeatedly authored Jun 22, 2017
2 parents 0777fb3 + a800c44 commit 42aeea1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/fluent/plugin/out_forward.rb
Original file line number Diff line number Diff line change
Expand Up @@ -402,8 +402,10 @@ def on_timer
log.trace "sending heartbeat", host: n.host, port: n.port, heartbeat_type: @heartbeat_type
n.usock = @usock if @usock
n.send_heartbeat
rescue Errno::EAGAIN, Errno::EWOULDBLOCK, Errno::EINTR, Errno::ECONNREFUSED
log.debug "failed to send heartbeat packet", host: n.host, port: n.port, heartbeat_type: @heartbeat_type, error: $!
rescue Errno::EAGAIN, Errno::EWOULDBLOCK, Errno::EINTR, Errno::ECONNREFUSED, Errno::ETIMEDOUT => e
log.debug "failed to send heartbeat packet", host: n.host, port: n.port, heartbeat_type: @heartbeat_type, error: e
rescue => e
log.debug "unexpected error happen during heartbeat", host: n.host, port: n.port, heartbeat_type: @heartbeat_type, error: e
end
}
end
Expand Down

0 comments on commit 42aeea1

Please sign in to comment.