Skip to content

Commit

Permalink
fixup! Huobi: Add V2 websocket support
Browse files Browse the repository at this point in the history
  • Loading branch information
gbjk committed Jan 11, 2025
1 parent 58ecd3c commit 6938c55
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions exchanges/huobi/huobi_websocket.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,16 +118,6 @@ func (h *HUOBI) wsReadMsgs(s stream.Connection) {
}
}
func (h *HUOBI) wsHandleData(respRaw []byte) error {
for _, op := range []string{wsSubOp, wsUnsubOp} {
key := op + "bed" // subbed, unsubbed
if ch, err := jsonparser.GetString(respRaw, key); err == nil {
if !h.Websocket.Match.IncomingWithData(op+":"+ch, respRaw) {
return fmt.Errorf("%w: %s:%s", stream.ErrNoMessageListener, op, ch)
}
return nil
}
}

if id, err := jsonparser.GetString(respRaw, "id"); err == nil {
if h.Websocket.Match.IncomingWithData(id, respRaw) {
return nil
Expand Down

0 comments on commit 6938c55

Please sign in to comment.