diff --git a/net/dnscache/dnscache.go b/net/dnscache/dnscache.go index df17bc510..33375adc5 100644 --- a/net/dnscache/dnscache.go +++ b/net/dnscache/dnscache.go @@ -457,9 +457,7 @@ func TLSDialer(fwd DialContextFunc, dnsCache *Resolver, tlsConfigBase *tls.Confi } }() go func() { - err := tlsConn.Handshake() - handshakeTimeoutCancel() - errc <- err + errc <- tlsConn.Handshake() }() if err := <-errc; err != nil { tcpConn.Close()