diff --git a/knotmirror/resyncer.go b/knotmirror/resyncer.go index 4d64466f..966b04ad 100644 --- a/knotmirror/resyncer.go +++ b/knotmirror/resyncer.go @@ -411,6 +411,8 @@ func (r *Resyncer) handleResyncFailure(ctx context.Context, repoDid syntax.DID, } func backoff(retries int, max int) time.Duration { + // Cap retries to prevent bit shift overflow + retries = min(retries, 30) dur := min(1<