Skip to content

Commit

Permalink
Kucoin: Fix matching id check on welcome message
Browse files Browse the repository at this point in the history
  • Loading branch information
gbjk committed Nov 21, 2023
1 parent e4952bc commit 1832ab5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions exchanges/kucoin/kucoin_websocket.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,15 +199,15 @@ func (ku *Kucoin) wsHandleData(respData []byte) error {
if err != nil {
return err
}
if resp.Type == "pong" || resp.Type == "welcome" {
return nil
}
if resp.ID != "" {
if !ku.Websocket.Match.IncomingWithData("msgID:"+resp.ID, respData) {
return fmt.Errorf("message listener not found: %s", resp.ID)
}
return nil
}
if resp.Type == "pong" || resp.Type == "welcome" {
return nil
}
topicInfo := strings.Split(resp.Topic, ":")
switch {
case strings.HasPrefix(marketAllTickersChannel, topicInfo[0]),
Expand Down

0 comments on commit 1832ab5

Please sign in to comment.