Skip to content

Commit

Permalink
fixup! Bitmex: Handle subscription errors
Browse files Browse the repository at this point in the history
  • Loading branch information
gbjk committed Oct 22, 2024
1 parent 3377e35 commit 9f8d704
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions exchanges/bitmex/bitmex_websocket.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,6 @@ var defaultSubscriptions = subscription.List{

// WsConnect initiates a new websocket connection
func (b *Bitmex) WsConnect() error {
ctx := context.TODO()

if !b.Websocket.IsEnabled() || !b.IsEnabled() {
return stream.ErrWebsocketNotEnabled
}
Expand All @@ -96,6 +94,7 @@ func (b *Bitmex) WsConnect() error {
b.Websocket.Wg.Add(1)
go b.wsReadData()

ctx := context.TODO()
if err := b.wsOpenStream(ctx, b.Websocket.Conn, wsPublicStream); err != nil {
return err
}
Expand Down

0 comments on commit 9f8d704

Please sign in to comment.