mirror of
https://github.com/restic/restic.git
synced 2026-10-11 12:37:13 +00:00
retry: limit retries based on elapsed time not count
Depending on how long an operation takes to fail, the total retry duration can currently vary between 1.5 and 15 minutes. In particular for temporarily interrupted network connections, the former timeout is too short. Thus always use a limit of 15 minutes.
This commit is contained in:
1 parent
a3633cad9e
commit
a60ee9b764
3 files changed
+24
-16
No files matched your search
@@ -425,7 +425,7 @@ func OpenRepository(ctx context.Context, opts GlobalOptions) (*repository.Reposi
|
||||
success := func(msg string, retries int) {
|
||||
Warnf("%v operation successful after %d retries\n", msg, retries)
|
||||
}
|
||||
be = retry.New(be, 10, report, success)
|
||||
be = retry.New(be, 15*time.Minute, report, success)
|
||||
|
||||
// wrap backend if a test specified a hook
|
||||
if opts.backendTestHook != nil {
|
||||
|
||||
Reference in new issue
Block a user