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
Existing function `Retry` is maintained with the same API to preserve
backwards compatibility.
New function `RetryWithContext` accepts a context and delivers it to the
retryable function. Each retry attempt can be limited by timeout (via
context, `WithAttemptTimeout`).
Garbage-collected channel `C` which wasn't used.
Replaced stop channel delivery with `close(ch)` to avoid having a
channel with a single entry.
Removed `time.After()` as it leaks the object until timer fires.
Fixessiderolabs#2
Signed-off-by: Andrey Smirnov <[email protected]>
Existing function `Retry` is maintained with the same API to preserve
backwards compatibility.
New function `RetryWithContext` accepts a context and delivers it to the
retryable function. Each retry attempt can be limited by timeout (via
context, `WithAttemptTimeout`).
Garbage-collected channel `C` which wasn't used.
Replaced stop channel delivery with `close(ch)` to avoid having a
channel with a single entry.
Removed `time.After()` as it leaks the object until timer fires.
Fixes#2
Signed-off-by: Andrey Smirnov <[email protected]>
Retry should respect context cancellation and abort on context cancel; timeout might be implemented via the context
The text was updated successfully, but these errors were encountered: