Skip to content

Instantly share code, notes, and snippets.

@redbo
Last active August 18, 2017 22:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save redbo/04d4ce4b4aa05b300be0e8fcfd06b67c to your computer and use it in GitHub Desktop.
Save redbo/04d4ce4b4aa05b300be0e8fcfd06b67c to your computer and use it in GitHub Desktop.
diff --git a/client/userclient.go b/client/userclient.go
index e708bec..07be012 100644
--- a/client/userclient.go
+++ b/client/userclient.go
@@ -439,7 +439,12 @@ func (c *userClient) authenticate() *http.Response {
// returns the error response if unable to.
func NewClient(tenant string, username string, password string, apikey string, region string, authurl string, private bool) (Client, *http.Response) {
c := &userClient{
- client: &http.Client{Timeout: 30 * time.Minute},
+ client: &http.Client{
+ Timeout: 30 * time.Minute,
+ Transport: &http.Transport{
+ MaxIdleConnsPerHost: 300,
+ },
+ },
tenant: tenant,
username: username,
password: password,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment