From ce3e1286f2e5e30d912ac74e8c7627655ff1ab94 Mon Sep 17 00:00:00 2001 From: Rafael Dantas Justo Date: Mon, 4 Jan 2016 10:46:14 -0200 Subject: [PATCH] TLS connection must be via TCP See #297 --- client.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client.go b/client.go index 219699ac..6c877548 100644 --- a/client.go +++ b/client.go @@ -162,7 +162,8 @@ func (c *Client) exchange(m *Msg, a string) (r *Msg, rtt time.Duration, err erro } if c.TLS { - co, err = DialTimeoutWithTLS(network, a, c.TLSConfig, c.dialTimeout()) + // TLS connection is always TCP + co, err = DialTimeoutWithTLS("tcp", a, c.TLSConfig, c.dialTimeout()) } else { co, err = DialTimeout(network, a, c.dialTimeout()) }