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
When using retry.Option retry.Attempts(0), this changes retry's error handling behavior for a timed-out context. retry.Do returns a nil response instead of an error.
Tested versions with this issue:
v4.3.1
v4.3.2
Expected
When a context times out, retry.Do should terminate and return an error.
Actual
When using retry.Attempts(0) and a context times out, retry.Do returns with no error, implying success. When retry.Attempts is not set or is set to another value, retry.Do returns an error.
Workaround
Set retry.Attempts to a large number, e.g. retry.Attempts(99999999)
Problem
When using retry.Option
retry.Attempts(0)
, this changes retry's error handling behavior for a timed-out context.retry.Do
returns a nil response instead of an error.Tested versions with this issue:
Expected
When a context times out,
retry.Do
should terminate and return an error.Actual
When using
retry.Attempts(0)
and a context times out,retry.Do
returns with no error, implying success. Whenretry.Attempts
is not set or is set to another value,retry.Do
returns an error.Workaround
Set
retry.Attempts
to a large number, e.g.retry.Attempts(99999999)
Test
The text was updated successfully, but these errors were encountered: