Skip to content

Commit

Permalink
fix missing body close
Browse files Browse the repository at this point in the history
  • Loading branch information
kian99 committed Sep 4, 2024
1 parent 821c1f1 commit ff606a5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/rpc/dial.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,12 @@ func (d Dialer) DialWebsocket(ctx context.Context, url string, headers http.Head
dialer := websocket.Dialer{
TLSClientConfig: d.TLSConfig,
}
conn, _, err := dialer.DialContext(context.Background(), url, headers)
conn, resp, err := dialer.DialContext(context.Background(), url, headers)
if err != nil {
zapctx.Error(ctx, "BasicDial failed", zap.Error(err))
return nil, errors.E(op, err)
}
defer resp.Body.Close()
return conn, nil
}

Expand Down

0 comments on commit ff606a5

Please sign in to comment.