From e3f50343bf4d1d5b0a65b0349bcf61a56dea1ac5 Mon Sep 17 00:00:00 2001 From: Daijiro Fukuda Date: Thu, 24 Mar 2022 14:33:16 +0900 Subject: [PATCH] Just reshape codes Signed-off-by: Daijiro Fukuda --- lib/fluent/plugin_helper/retry_state.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/fluent/plugin_helper/retry_state.rb b/lib/fluent/plugin_helper/retry_state.rb index 8816773d95..82e5689af3 100644 --- a/lib/fluent/plugin_helper/retry_state.rb +++ b/lib/fluent/plugin_helper/retry_state.rb @@ -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 @@ -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 @@ -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