Skip to content

Commit

Permalink
fix(idtoken): increase MaxIdleConnsPerHost to 100 in NewClient (#1754)
Browse files Browse the repository at this point in the history
closes: #1744
  • Loading branch information
quartzmo authored Nov 21, 2022
1 parent caf7af0 commit 629e217
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion idtoken/idtoken.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ func NewClient(ctx context.Context, audience string, opts ...ClientOption) (*htt
// Skip DialSettings validation so added TokenSource will not conflict with user
// provided credentials.
opts = append(opts, option.WithTokenSource(ts), internaloption.SkipDialSettingsValidation())
t, err := htransport.NewTransport(ctx, http.DefaultTransport, opts...)
httpTransport := http.DefaultTransport.(*http.Transport).Clone()
httpTransport.MaxIdleConnsPerHost = 100
t, err := htransport.NewTransport(ctx, httpTransport, opts...)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 629e217

Please sign in to comment.