Skip to content

Commit d14fe39

Browse files
committed
close the connection if the TLS handshake errors
1 parent 508e0c9 commit d14fe39

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

internal/api/proxy.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ func withProxyTransport(baseTransport *http.Transport, proxyURL *url.URL, proxyP
6363
}
6464
tlsConn := tls.Client(conn, cfg)
6565
if err := tlsConn.HandshakeContext(ctx); err != nil {
66+
tlsConn.Close()
6667
return nil, err
6768
}
6869
return tlsConn, nil

0 commit comments

Comments
 (0)