Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix calculation way of attempts #37

merged 2 commits into from Sep 11, 2019


Copy link

commented Sep 9, 2019

This fix is around timeout attempts introduced in #34, that change is insufficient due to the boundary value problem. Due to this problem, the timeout occurs earlier than the setting value.

We should calculate the value of attempts by dividing, rounding up and adding 1. The reason for adding 1 is that the first attempt is performed without waiting for the delay.

It is difficult to explain, so here are some examples:

timeout sec attempts now (problem) attempts desired (fixed)
14 0 2
15 1 2
16 1 3

@fujiwara fujiwara merged commit d294593 into kayac:master Sep 11, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.