Skip to content

Commit 629e217

Browse files
authored
fix(idtoken): increase MaxIdleConnsPerHost to 100 in NewClient (#1754)
closes: #1744
1 parent caf7af0 commit 629e217

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

idtoken/idtoken.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ func NewClient(ctx context.Context, audience string, opts ...ClientOption) (*htt
5454
// Skip DialSettings validation so added TokenSource will not conflict with user
5555
// provided credentials.
5656
opts = append(opts, option.WithTokenSource(ts), internaloption.SkipDialSettingsValidation())
57-
t, err := htransport.NewTransport(ctx, http.DefaultTransport, opts...)
57+
httpTransport := http.DefaultTransport.(*http.Transport).Clone()
58+
httpTransport.MaxIdleConnsPerHost = 100
59+
t, err := htransport.NewTransport(ctx, httpTransport, opts...)
5860
if err != nil {
5961
return nil, err
6062
}

0 commit comments

Comments
 (0)