lib/powertrack/streaming/retrier.rb in powertrack-1.0.3 vs lib/powertrack/streaming/retrier.rb in powertrack-1.1.0
- old
+ new
@@ -54,10 +54,10 @@
# Retries the block of code provided according to the configuration of the
# retrier.
def retry(&block)
# TODO: manage exceptions
- while @continue && @retries < @max_retries
+ while @continue && @retries <= @max_retries
res = yield
if @continue
@retries += 1
sleep(@backoff.next_interval)
end