mirror of
https://github.com/minio/minio
synced 2024-11-05 17:34:01 +00:00
reuse transports for callhome and remote tgt validation (#18912)
This commit is contained in:
parent
486e2e48ea
commit
bcfd7fbbcf
4 changed files with 5 additions and 3 deletions
|
@ -2337,7 +2337,7 @@ func getKubernetesInfo(dctx context.Context) madmin.KubernetesInfo {
|
|||
}
|
||||
|
||||
client := &http.Client{
|
||||
Transport: NewHTTPTransport(),
|
||||
Transport: globalHealthChkTransport,
|
||||
Timeout: 10 * time.Second,
|
||||
}
|
||||
|
||||
|
|
|
@ -179,7 +179,7 @@ func checkRemoteEndpoint(ctx context.Context, epURL *url.URL) error {
|
|||
}
|
||||
|
||||
client := &http.Client{
|
||||
Transport: NewHTTPTransport(),
|
||||
Transport: globalRemoteTargetTransport,
|
||||
Timeout: 10 * time.Second,
|
||||
}
|
||||
|
||||
|
|
|
@ -390,6 +390,8 @@ var (
|
|||
|
||||
globalRemoteTargetTransport http.RoundTripper
|
||||
|
||||
globalHealthChkTransport http.RoundTripper
|
||||
|
||||
globalDNSCache = &dnscache.Resolver{
|
||||
Timeout: 5 * time.Second,
|
||||
}
|
||||
|
|
|
@ -339,7 +339,7 @@ func serverHandleCmdArgs(ctxt serverCtxt) {
|
|||
globalProxyEndpoints = GetProxyEndpoints(globalEndpoints)
|
||||
globalInternodeTransport = NewInternodeHTTPTransport(ctxt.MaxIdleConnsPerHost)()
|
||||
globalRemoteTargetTransport = NewRemoteTargetHTTPTransport(false)()
|
||||
|
||||
globalHealthChkTransport = NewHTTPTransport()
|
||||
globalForwarder = handlers.NewForwarder(&handlers.Forwarder{
|
||||
PassHost: true,
|
||||
RoundTripper: NewHTTPTransportWithTimeout(1 * time.Hour),
|
||||
|
|
Loading…
Reference in a new issue