Skip to content

Commit

Permalink
Add timeout for ECS RAM role
Browse files Browse the repository at this point in the history
  • Loading branch information
JacksonTian committed Aug 12, 2024
1 parent a40f98e commit ba4db56
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sdk/auth/signers/signer_ecs_ram_role.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,9 @@ func (signer *EcsRamRoleSigner) refreshApi(request *requests.CommonRequest) (res
err = fmt.Errorf("refresh Ecs sts token err: %s", err.Error())
return
}
httpClient := &http.Client{}
httpClient := &http.Client{
Timeout: 5 * time.Second,
}
httpResponse, err := httpClient.Do(httpRequest)
if err != nil {
err = fmt.Errorf("refresh Ecs sts token err: %s", err.Error())
Expand Down

0 comments on commit ba4db56

Please sign in to comment.