mirror of
https://github.com/minio/minio.git
synced 2024-12-24 06:05:55 -05:00
reuse transports for callhome and remote tgt validation (#18912)
This commit is contained in:
parent
486e2e48ea
commit
bcfd7fbbcf
@ -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 New Issue
Block a user