spdyroundrippter: close the connection if tls handshake fails

This commit is contained in:
Antonio Ojea 2022-05-03 16:14:51 +02:00
parent e7a2ce75e5
commit 6d14c8e13f

View File

@ -266,6 +266,7 @@ func (s *SpdyRoundTripper) tlsConn(ctx context.Context, rwc net.Conn, targetHost
// need to manually call Handshake() so we can call VerifyHostname() below
if err := tlsConn.HandshakeContext(ctx); err != nil {
tlsConn.Close()
return nil, err
}