mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
Use pooled http client for fetching providers
While the TLS handshakes are a fairly small overhead compared to downloading the providers, clients in some situation are failing to complete the TLS handshake in a timely manner. It's unclear if this is because of heavily constrained clients are stalling while doing the major crpto operations, or the edge servers are throttling repeated requests from the same IPs. This should allow reusing the open TLS connection to the release edge servers during init.
This commit is contained in:
@@ -33,7 +33,7 @@ const protocolVersionHeader = "x-terraform-protocol-version"
|
|||||||
|
|
||||||
var releaseHost = "https://releases.hashicorp.com"
|
var releaseHost = "https://releases.hashicorp.com"
|
||||||
|
|
||||||
var httpClient = cleanhttp.DefaultClient()
|
var httpClient = cleanhttp.DefaultPooledClient()
|
||||||
|
|
||||||
// An Installer maintains a local cache of plugins by downloading plugins
|
// An Installer maintains a local cache of plugins by downloading plugins
|
||||||
// from an online repository.
|
// from an online repository.
|
||||||
|
Reference in New Issue
Block a user