Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Commit

Permalink
increase activation timeout to 5 seconds
Browse files Browse the repository at this point in the history
Signed-off-by: 27149chen <[email protected]>
  • Loading branch information
27149chen committed Jan 30, 2019
1 parent ebe04e1 commit 8f8a750
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions remote/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8f8a750

Please sign in to comment.