Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
transport/http: don't reuse a base transport between clients (#532)
Previously sync.Once was used to cache a fallback base transport. This caused a race condition when setting MaxIdleConnsPerHost and TLSClientConfig in defaultBaseTransport (above). Because of these settings, it isn't valid to share the base transport across clients. I conferred with @neild and determined that it is impossible to implement a transport.Clone for < Go 1.13, so instead we should initialize a new transport with default values each time in this case. Fixes googleapis/google-cloud-go#2405
- Loading branch information