mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-05 18:24:07 +00:00
spdyroundrippter: close the connection if tls handshake fails
This commit is contained in:
parent
e7a2ce75e5
commit
6d14c8e13f
@ -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
|
// need to manually call Handshake() so we can call VerifyHostname() below
|
||||||
if err := tlsConn.HandshakeContext(ctx); err != nil {
|
if err := tlsConn.HandshakeContext(ctx); err != nil {
|
||||||
|
tlsConn.Close()
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user