Skip to content

Commit

Permalink
Move tick check to after heartbeat for avoiding the impact of other n…
Browse files Browse the repository at this point in the history
…ode heartbeat. fix #1719
  • Loading branch information
repeatedly committed Nov 6, 2017
1 parent 6745366 commit 59d30bd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/fluent/plugin/out_forward.rb
Original file line number Diff line number Diff line change
Expand Up @@ -395,9 +395,6 @@ def rebuild_weight_array

def on_timer
@nodes.each {|n|
if n.tick
rebuild_weight_array
end
begin
log.trace "sending heartbeat", host: n.host, port: n.port, heartbeat_type: @heartbeat_type
n.usock = @usock if @usock
Expand All @@ -407,6 +404,9 @@ def on_timer
rescue => e
log.debug "unexpected error happen during heartbeat", host: n.host, port: n.port, heartbeat_type: @heartbeat_type, error: e
end
if n.tick
rebuild_weight_array
end
}
end

Expand Down

0 comments on commit 59d30bd

Please sign in to comment.