diff --git a/pkg/perf/publicip/publicip_task.go b/pkg/perf/publicip/publicip_task.go index 70cb32ecb..fa5b9a62f 100644 --- a/pkg/perf/publicip/publicip_task.go +++ b/pkg/perf/publicip/publicip_task.go @@ -274,6 +274,8 @@ func getRealPublicIP() (net.IP, error) { return con, nil }, } + cl.RetryMax = 5 + response, err := cl.Get("https://api.ipify.org/") if err != nil { return nil, errors.Join(err, errPublicIPLookup) diff --git a/pkg/provision/engine.go b/pkg/provision/engine.go index 74c12f0a7..1ef6920ef 100644 --- a/pkg/provision/engine.go +++ b/pkg/provision/engine.go @@ -92,6 +92,8 @@ const ( opPause // opResume resumes a deployment opResume + // servers default timeout + defaultHttpTimeout = 10 * time.Second ) // engineJob is a persisted job instance that is @@ -1212,7 +1214,8 @@ func isTwinVerified(twinID uint32) (verified bool, err error) { request.URL.RawQuery = q.Encode() cl := retryablehttp.NewClient() - cl.HTTPClient.Timeout = 10 * time.Second + cl.HTTPClient.Timeout = defaultHttpTimeout + cl.RetryMax = 5 response, err := cl.StandardClient().Do(request) if err != nil {