mirror of
https://github.com/siderolabs/talos.git
synced 2025-11-14 15:21:15 +01:00
fix: bump timeout for config downloading on bare metal
Depending on the nature of the error, each attempt might take much longer than 1 second, so bump the overall timeout, but print the error encountered so that longer timeout doesn't mean less feedback for the user. Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
This commit is contained in:
parent
64044e98ab
commit
ea98dba870
@ -82,7 +82,7 @@ func Download(ctx context.Context, endpoint string, opts ...Option) (b []byte, e
|
|||||||
req.Header.Set(k, v)
|
req.Header.Set(k, v)
|
||||||
}
|
}
|
||||||
|
|
||||||
err = retry.Exponential(60*time.Second, retry.WithUnits(time.Second), retry.WithJitter(time.Second)).Retry(func() error {
|
err = retry.Exponential(180*time.Second, retry.WithUnits(time.Second), retry.WithJitter(time.Second), retry.WithErrorLogging(true)).Retry(func() error {
|
||||||
select {
|
select {
|
||||||
case <-ctx.Done():
|
case <-ctx.Done():
|
||||||
return retry.UnexpectedError(context.Canceled)
|
return retry.UnexpectedError(context.Canceled)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user