From 8f8a7504266389ad78287a58764261e31a12a99a Mon Sep 17 00:00:00 2001 From: 27149chen <7991675+27149chen@users.noreply.github.com> Date: Wed, 30 Jan 2019 17:50:15 +0800 Subject: [PATCH] increase activation timeout to 5 seconds Signed-off-by: 27149chen <7991675+27149chen@users.noreply.github.com> --- remote/client.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/remote/client.go b/remote/client.go index 0b930149..6f81a776 100644 --- a/remote/client.go +++ b/remote/client.go @@ -51,12 +51,12 @@ func (s *remoteClient) Activate(activateRequest resources.ActivateRequest) error clientWithShortTimeout := new(http.Client) *clientWithShortTimeout = *s.httpClient - clientWithShortTimeout.Timeout = time.Second * 2 + clientWithShortTimeout.Timeout = time.Second * 5 var err error var response *http.Response - // retry 30 times in case the ubiquity server is not ready yet - for i := 30; i > 0; i-- { + // retry 15 times in case the ubiquity server is not ready yet + for i := 15; i > 0; i-- { response, err = utils.HttpExecute(clientWithShortTimeout, "POST", activateURL, activateRequest, activateRequest.Context) if err == nil { break