Skip to content

Commit 58eaaa5

Browse files
committed
close the connection if the TLS handshake errors
1 parent 9973e05 commit 58eaaa5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

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)