TLS connection must be via TCP

See #297
This commit is contained in:
Rafael Dantas Justo 2016-01-04 10:46:14 -02:00
parent 72d475a8fe
commit ce3e1286f2
1 changed files with 2 additions and 1 deletions

View File

@ -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())
}