Skip to content

Commit

Permalink
Just reshape codes
Browse files Browse the repository at this point in the history
Signed-off-by: Daijiro Fukuda <fukuda@clear-code.com>
  • Loading branch information
daipom authored and ashie committed Mar 24, 2022
1 parent 4819ccf commit e3f5034
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/fluent/plugin_helper/retry_state.rb
Expand Up @@ -45,7 +45,7 @@ def initialize(title, wait, timeout, forever, max_steps, randomize, randomize_wi
@timeout = timeout
@timeout_at = @start + timeout
@has_reached_timeout = false
@has_timeouted = false
@has_timed_out = false
@current = :primary

if randomize_width < 0 || randomize_width > 0.5
Expand Down Expand Up @@ -128,10 +128,10 @@ def step

@next_time = calc_next_time

unless @has_reached_timeout
@has_reached_timeout = @next_time >= @timeout_at
if @has_reached_timeout
@has_timed_out = @next_time >= @timeout_at
else
@has_timeouted = @next_time >= @timeout_at
@has_reached_timeout = @next_time >= @timeout_at
end

nil
Expand All @@ -145,7 +145,7 @@ def limit?
if @forever
false
else
@has_timeouted || !!(@max_steps && @steps >= @max_steps)
@has_timed_out || !!(@max_steps && @steps >= @max_steps)
end
end
end
Expand Down

0 comments on commit e3f5034

Please sign in to comment.