Skip to content

How to set a higher MaxIdleConnsPerHost for idtoken client #1744

@david-gang

Description

@david-gang

Thanks for stopping by to ask us a question! Please make sure to include:

  • What you're trying to do

set a higher MaxIdleConnsPerHost for idtoken client in order to get a better latency

  • What code you've already tried
httpTransport := http.DefaultTransport.(*http.Transport).Clone()
	httpTransport.MaxIdleConnsPerHost = 100
	baseClient := http.Client{
		Transport: httpTransport,
	}
client, err := idtoken.NewClient(ctx, aud, option.WithHTTPClient(&baseClient))
  • Any error messages you're getting

transport/http: WithHTTPClient passed to NewTransport

The problem is similar to here:

#1074

but the solution does not look applicable as i have no real access to the transport here.

PLEASE READ: If you have a support contract with Google, please create an issue in the support console instead of filing on GitHub. This will ensure a timely response.

Metadata

Metadata

Assignees

Labels

priority: p3Desirable enhancement or fix. May not be included in next release.type: questionRequest for information or clarification. Not an issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions