From 6632f04fe6a813e7e2e66c1d231039cbf007a675 Mon Sep 17 00:00:00 2001 From: Keiichi Hirobe Date: Tue, 15 Nov 2022 18:54:26 +0900 Subject: [PATCH] fix bug, always use config.timer.After instead of time.After --- retry.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/retry.go b/retry.go index 1e2ccff..53bac9c 100644 --- a/retry.go +++ b/retry.go @@ -101,7 +101,7 @@ func Do(retryableFunc RetryableFunc, opts ...Option) error { config.onRetry(n, err) select { - case <-time.After(delay(config, n, err)): + case <-config.timer.After(delay(config, n, err)): case <-config.context.Done(): return nil }