Skip to content

Commit

Permalink
changing default timeout to something big
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisst committed Dec 17, 2018
1 parent b0f52a8 commit 23cc9de
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions third_party/terraform/utils/transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func isEmptyValue(v reflect.Value) bool {
}

func sendRequest(config *Config, method, rawurl string, body map[string]interface{}) (map[string]interface{}, error) {
return sendRequestWithTimeout(config, method, rawurl, body, 5)
return sendRequestWithTimeout(config, method, rawurl, body, 5*time.Minute)
}

func sendRequestWithTimeout(config *Config, method, rawurl string, body map[string]interface{}, timeout time.Duration) (map[string]interface{}, error) {
Expand All @@ -42,7 +42,7 @@ func sendRequestWithTimeout(config *Config, method, rawurl string, body map[stri
reqHeaders.Set("Content-Type", "application/json")

if timeout == 0 {
timeout = time.Duration(5) * time.Minute
timeout = time.Duration(1) * time.Hour
}

var res *http.Response
Expand Down

0 comments on commit 23cc9de

Please sign in to comment.