mirror of
https://github.com/minio/minio.git
synced 2025-01-11 23:13:23 -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{
|
client := &http.Client{
|
||||||
Transport: NewHTTPTransport(),
|
Transport: globalHealthChkTransport,
|
||||||
Timeout: 10 * time.Second,
|
Timeout: 10 * time.Second,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -179,7 +179,7 @@ func checkRemoteEndpoint(ctx context.Context, epURL *url.URL) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
client := &http.Client{
|
client := &http.Client{
|
||||||
Transport: NewHTTPTransport(),
|
Transport: globalRemoteTargetTransport,
|
||||||
Timeout: 10 * time.Second,
|
Timeout: 10 * time.Second,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -390,6 +390,8 @@ var (
|
|||||||
|
|
||||||
globalRemoteTargetTransport http.RoundTripper
|
globalRemoteTargetTransport http.RoundTripper
|
||||||
|
|
||||||
|
globalHealthChkTransport http.RoundTripper
|
||||||
|
|
||||||
globalDNSCache = &dnscache.Resolver{
|
globalDNSCache = &dnscache.Resolver{
|
||||||
Timeout: 5 * time.Second,
|
Timeout: 5 * time.Second,
|
||||||
}
|
}
|
||||||
|
@ -339,7 +339,7 @@ func serverHandleCmdArgs(ctxt serverCtxt) {
|
|||||||
globalProxyEndpoints = GetProxyEndpoints(globalEndpoints)
|
globalProxyEndpoints = GetProxyEndpoints(globalEndpoints)
|
||||||
globalInternodeTransport = NewInternodeHTTPTransport(ctxt.MaxIdleConnsPerHost)()
|
globalInternodeTransport = NewInternodeHTTPTransport(ctxt.MaxIdleConnsPerHost)()
|
||||||
globalRemoteTargetTransport = NewRemoteTargetHTTPTransport(false)()
|
globalRemoteTargetTransport = NewRemoteTargetHTTPTransport(false)()
|
||||||
|
globalHealthChkTransport = NewHTTPTransport()
|
||||||
globalForwarder = handlers.NewForwarder(&handlers.Forwarder{
|
globalForwarder = handlers.NewForwarder(&handlers.Forwarder{
|
||||||
PassHost: true,
|
PassHost: true,
|
||||||
RoundTripper: NewHTTPTransportWithTimeout(1 * time.Hour),
|
RoundTripper: NewHTTPTransportWithTimeout(1 * time.Hour),
|
||||||
|
Loading…
Reference in New Issue
Block a user