You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Depending on whether retry.Attempts is set to 0 or something bigger than 0 the function given as retry.DelayType gets n either from 0,1,2,... or 1,2,3,....
Delay with attempts != 0 -> 0
Delay with attempts != 0 -> 1
Delay with attempts == 0 -> 1
Delay with attempts == 0 -> 2
Delay with attempts == 0 -> 3
I would expect the retry.DelayType function to either always get n from 0,1,2,... or always from 1,2,3,... but not one or the other depending on the other config parameters.
The text was updated successfully, but these errors were encountered:
haaawk
added a commit
to haaawk/retry-go
that referenced
this issue
Jan 21, 2025
Without this change DelayType function gets n either from
0,1,2,... or from 1,2,3,... depending on the value of Attempts
config value.
This change unifies the behaviour and makes n always take values from
0,1,2,...
Fixesavast#124
Signed-off-by: Piotr Jastrzebski <haaawk@gmail.com>
Without this change DelayType function gets n either from
0,1,2,... or from 1,2,3,... depending on the value of Attempts
config value.
This change unifies the behaviour and makes n always take values from
1,2,3,...
Fixesavast#124
Signed-off-by: Piotr Jastrzebski <haaawk@gmail.com>
Depending on whether
retry.Attempts
is set to0
or something bigger than0
the function given asretry.DelayType
getsn
either from0,1,2,...
or1,2,3,...
.Here's a reproducer:
It prints:
I would expect the
retry.DelayType
function to either always get n from0,1,2,...
or always from1,2,3,...
but not one or the other depending on the other config parameters.The text was updated successfully, but these errors were encountered: