Skip to content

Commit

Permalink
Merge 2b937f7 into 3fd1455
Browse files Browse the repository at this point in the history
  • Loading branch information
JacksonTian committed Sep 27, 2023
2 parents 3fd1455 + 2b937f7 commit 1da9176
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions sdk/api_timeout.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,15 @@ var apiTimeouts = `{
}
`

var timeout map[string]map[string]int

func init() {
timeout = make(map[string]map[string]int)
json.Unmarshal([]byte(apiTimeouts), &timeout)
}

func getAPIMaxTimeout(product, actionName string) (time.Duration, bool) {
timeout := make(map[string]map[string]int)
err := json.Unmarshal([]byte(apiTimeouts), &timeout)
if err != nil {
if timeout == nil {
return 0 * time.Millisecond, false
}

Expand Down

0 comments on commit 1da9176

Please sign in to comment.