client: dial tls on Dialer if tls config is set
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com> (cherry picked from commit 5974fc25403f149be796c6d69270881854547633) Signed-off-by: Andrew Hsu <andrewhsu@docker.com> Upstream-commit: c2d005320705c1339f8b2d5935f50f4c5b9cc6fc Component: engine
This commit is contained in:
@@ -413,7 +413,7 @@ func (cli *Client) SetCustomHTTPHeaders(headers map[string]string) {
|
||||
func (cli *Client) Dialer() func(context.Context) (net.Conn, error) {
|
||||
return func(ctx context.Context) (net.Conn, error) {
|
||||
if transport, ok := cli.client.Transport.(*http.Transport); ok {
|
||||
if transport.DialContext != nil {
|
||||
if transport.DialContext != nil && transport.TLSClientConfig == nil {
|
||||
return transport.DialContext(ctx, cli.proto, cli.addr)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user