This commit is contained in:
Sahil Sojitra 2026-02-24 21:55:14 -08:00 committed by GitHub
commit 5c1555b566
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -249,6 +249,9 @@ func newClientTransportWS(endpoint string, cfg *clientConfig) (reconnectFunc, er
}
conn, resp, err := dialer.DialContext(ctx, dialURL, header)
if err != nil {
if resp != nil {
resp.Body.Close()
}
hErr := wsHandshakeError{err: err}
if resp != nil {
hErr.status = resp.Status