From 5974fc25403f149be796c6d69270881854547633 Mon Sep 17 00:00:00 2001 From: Tonis Tiigi Date: Tue, 4 Sep 2018 15:09:44 -0700 Subject: [PATCH] client: dial tls on Dialer if tls config is set Signed-off-by: Tonis Tiigi --- client/client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/client.go b/client/client.go index 7475d3f968..5031502acf 100644 --- a/client/client.go +++ b/client/client.go @@ -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) } }